Skip to content

Commit

Permalink
Automate package.json versioning as part of build (#10)
Browse files Browse the repository at this point in the history
The package.json's version field is now 0.0.0. Installing branch-manager
from the build folder will now always tell you that you're running
0.0.0. The version has to be parseable by node-semver so it can't be
something be readable like "develop". On builds triggered by a tags that
match [0-9]+\.[0-9]+\.[0-9]+, the version is automatically updated in
the build/package.json to reflect the tag.
  • Loading branch information
Michael Wu authored Jul 10, 2017
1 parent f02b840 commit 155fbcf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions circle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ jobs:
set -euo pipefail
TAG=${CIRCLE_TAG:-}
if [[ ${TAG} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
yarn version --new-version "$TAG" --no-git-tag-version
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc
npm publish
else
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "branch-manager",
"version": "0.2.0",
"version": "0.0.0",
"description": "Manage your branches on Github",
"main": "./dist/main.js",
"repository": "https://github.com/michael-yx-wu/branch-manager",
Expand Down

0 comments on commit 155fbcf

Please sign in to comment.