Skip to content

Commit 0c54f30

Browse files
committed
Set version_name automatically
Signed-off-by: Gary Kim <[email protected]>
1 parent 9994d09 commit 0c54f30

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ For a new file, add this license header to the top of the file:
8888
### Make a new release
8989

9090
1. Ensure that all CI tests pass on the latest commit.
91-
2. Update the version number with `npm version [major|minor|patch] --no-git` and update the version name manually in [package.json](package.json).
91+
2. Update the version number with `npm version [major|minor|patch] --no-git`.
9292
3. Run [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator) with `--since-tag <LAST VERSION> --future-release <NEW VERSION>` and take the resulting generated changelog and adjust it to our changelog style. ([gary-kim/gcg-fork](https://github.com/gary-kim/gcg-fork) has a patch for making the changelog in SASPES's style)
9393
4. Commit with the message `Open Beta v[VERSION] Release`. Add this to the [CHANGELOG.md](CHANGELOG.md) file and make a PR for the new version. Wait until this PR gets merged (unlike other PRs, this PR should be merged with `--ff-only` rather then a merge commit).
9494
5. Run `npm ci` to install all dependencies for building from [package-lock.json](package-lock.json).
95-
6. Make a new git commit and tag with `git commit -S`, `git tag VERSION -s`, add the new version name as the annotation, then run `git push origin VERSION`.
95+
6. Tag the new release with `git tag VERSION -s` (ex: `git tag v0.20.0 -s`), add the new version name as the annotation (ex: `Open Beta 0.20.0`), then run `git push origin VERSION`.
9696
7. Run `npm run libraries` to generate third-party library attributions.
9797
8. Run `npm run clean`, `SASPES_OFFICIAL_RELEASE=true npm run webpack:build:firefox`, then `npm run package`. Upload the resulting package to [AMO](https://addons.mozilla.org/en-US/developers/addons) to have the extension signed. Upload the result into GitHub releases then update the update server to point to the new release.
9898
9. Run `npm run clean`, `SASPES_OFFICIAL_RELEASE=true npm run webpack:build:chromium`, then `npm run package`. Upload the resulting package to [CWS](https://chrome.google.com/webstore/developer/dashboard) to have the new version signed and released.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "saspes",
33
"version": "0.21.0",
4-
"version_name": "Open Beta 0.21.0",
4+
"version_name_prefix": "Open Beta ",
55
"private": true,
66
"description": "SAS Powerschool Enhancement Suite",
77
"main": "index.js",

webpack-helpers.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ module.exports = {
1515
return !!process.env.SASPES_OFFICIAL_RELEASE;
1616
},
1717
versionName: function () {
18+
const version_name = package.version_name_prefix + package.version
1819
if (this.isRelease()) {
19-
return package.version_name;
20+
return version_name;
2021
}
21-
return package.version_name + " Development " + (commandExistsSync('git')? execSync('git describe --tags'): "(Exact Version Unknown)");
22+
return version_name + " Development " + (commandExistsSync('git')? execSync('git describe --tags'): "(Exact Version Unknown)");
2223
}
2324
}

0 commit comments

Comments
 (0)