-
Notifications
You must be signed in to change notification settings - Fork 74
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(changelog): include latest changelog in npm packages
- Loading branch information
Showing
1 changed file
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,29 @@ | ||
#! /usr/bin/env bash | ||
|
||
set -x; | ||
|
||
bump=${1:?missing required semantic-version bump. usage: \`$0 major|minor|patch\`} | ||
echo "semantic-version bump: $bump" | ||
|
||
cp {,_}package.json | ||
npm --no-git-tag-version version "$bump" &>/dev/null | ||
npx conventional-changelog -i CHANGELOG.md -s -p angular | ||
|
||
npm run --silent lint | ||
npm run --silent build | ||
npm run --silent test | ||
npx lerna version \ | ||
--yes --force-publish=* \ | ||
--no-push --no-git-tag-version \ | ||
$bump | ||
"$bump" | ||
|
||
cp package.json _package.json | ||
npm --no-git-tag-version version $bump &>/dev/null | ||
npx conventional-changelog -i CHANGELOG.md -s -p angular | ||
git add CHANGELOG.md lerna.json | ||
version=$(npx --yes json -f package.json version) | ||
git commit -m "docs(CHANGELOG): $version" -n | ||
mv -f _package.json package.json | ||
npm version $bump -m "chore(release): %s" | ||
git commit -m "docs(CHANGELOG): $(npx --yes json -f package.json version)" -n | ||
mv -f {_,}package.json | ||
npm version "$bump" -m "chore(release): %s" | ||
git push --follow-tags | ||
npx conventional-github-releaser -p angular | ||
|
||
read -p "Please enter your npm 2FA one-time password: " NPM_OTP </dev/tty | ||
|
||
npx lerna exec --concurrency 1 --no-bail -- npm publish --otp=$NPM_OTP | ||
npx lerna exec --concurrency 1 --no-bail -- npm publish --otp="$NPM_OTP" |