-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
42ac7ba
commit 8431ebb
Showing
1 changed file
with
35 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
tagName=$1; | ||
|
||
if [[ -z "${tagName}" ]]; then | ||
exit 1 | ||
fi | ||
|
||
update_version () { | ||
local jsonFile=$1 | ||
node > out_${jsonFile} <<EOF | ||
var data = require('./${jsonFile}'); | ||
data.version = '${tagName}'; | ||
console.log(JSON.stringify(data, null, 2)); | ||
EOF | ||
rm ${jsonFile} | ||
mv out_${jsonFile} ${jsonFile} | ||
} | ||
|
||
update_version package.json | ||
cd lib/ | ||
update_version lcp_manifest.json | ||
cd ../ | ||
|
||
git add package.json lib/lcp_manifest.json | ||
git commit -m "update version tag to ${tagName}" | ||
|
||
read -p "Enter tag message: " msg | ||
git tag -s "${tagName}" -m "${msg}" | ||
git push origin | ||
git push origin "${tagName}" | ||
|