This repo now uses package.json as the canonical app version source. The web footer and !version output both read from it through the build info helper.
git status
If the tree is not clean, commit or intentionally discard the changes first.
For major/minor/patch releases:
npm version major --no-git-tag-version
or
npm version minor --no-git-tag-version
or
npm version patch --no-git-tag-version
If you are setting a specific release directly:
npm version 3.0.0 --no-git-tag-version
That updates:
package.jsonpackage-lock.jsonEdit:
CHANGELOG.mdPut the newest release entry at the top.
git add package.json package-lock.json CHANGELOG.md README.md RELEASING.md
git commit -m "release: v3.0.0"
Use annotated tags:
git tag -a v3.0.0 -m "MainsBot v3.0.0"
git push origin master
git push origin v3.0.0
If your default branch is not master, use the correct branch name.
After the tag is pushed:
Releases.Draft a new release.v3.0.0.MainsBot v3.0.0.CHANGELOG.md section into the release notes.Use the same section layout as the changelog:
On the server:
cd /opt/mainsbot
git fetch origin
git checkout master
git pull --ff-only
npm install
sudo systemctl restart mainsbot@<instance>
sudo systemctl restart mainsbot-web@<instance>
After deploy:
node -p "require('./package.json').version"
journalctl -u mainsbot@<instance> -n 50 --no-pager
journalctl -u mainsbot-web@<instance> -n 50 --no-pager
Then verify:
!version returns the new build version/api/status returns the updated build metadata