Skip to content

Commit

Permalink
fix(publish script): ensure changelog is properly generated
Browse files Browse the repository at this point in the history
  • Loading branch information
eysi09 committed Sep 17, 2018
1 parent 5e592f9 commit e2f1d8e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bin/publish
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@ cd ${garden_root}
lerna version --no-push
git reset HEAD~1

./node_modules/.bin/conventional-changelog -p angular -i CHANGELOG.md --commit-path . -s
git add CHANGELOG.md
# Note: conventional-changelog reads the current version from package.json and finds previous versions
# by searching for the string "tag:" within commit messages. It should therefore run after the
# version is updated in package.json but before the change is commited and tagged.

./node_modules/.bin/conventional-changelog -p angular -i CHANGELOG.md --commit-path . -s --pkg ./garden-cli
git add .
version=$(node -p "require('./lerna.json').version")
git commit -m "chore(release): release ${version}"

# We need to re-create the tag created by lerna since adding the changelog changes the commit hash
git tag -d v${version}
git tag -a v${version} -m "v${version}"

git push --tags --no-verify
git push origin HEAD --no-verify

Expand Down

0 comments on commit e2f1d8e

Please sign in to comment.