-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add postversion standalone script
- Loading branch information
1 parent
2dfcac7
commit 18fd8c2
Showing
2 changed files
with
22 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/sh | ||
|
||
# Exit on any non-zero return codes | ||
set -e | ||
|
||
# Get top-level package version (without quotes) | ||
npm_package_version=$(npm pkg get version | sed s/\"//g) | ||
|
||
# Re-version all workspace packages | ||
npm --workspaces version $npm_package_version | ||
|
||
# Update the global lock file | ||
npm i | ||
|
||
# Commit all updates to version control | ||
git add -A | ||
git commit -m "Release v$npm_package_version" | ||
git push | ||
|
||
git tag -a "v$npm_package_version" HEAD -m \"$(git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:'%h %s')\" | ||
git push origin v$npm_package_version |