Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix update script test for fetch when releasing a new version
Previously we were relying on VERSION.txt for the name of the latest release, however this doesn't work in scenarios where we have changed the version number in preperation but have not yet made the release, as we found recently (see issue #1205). Instead we get the latest release version using the GitHub API [[1]]. Note that we have to drop the `v` at the beginning of the tag name, because for some reason GitHub doesn't include that in the archive file name. This commit uses the `superagent` library to do the request to avoid a lot of boilerplate; note that we have to set the user agent to something, because otherwise GitHub will forbid the request [[2]]. [1]: #1205 (comment) [2]: ladjs/superagent#1495 (comment)
- Loading branch information