-
Notifications
You must be signed in to change notification settings - Fork 125
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
4b0e969
commit 7cb8d1e
Showing
1 changed file
with
44 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,44 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
current_branch=$(git branch | sed -n -e 's/^\* \(.*\)/\1/p') | ||
version=$1 | ||
date=$(date "+%Y%m%d") | ||
dev_branch="release/v${version}-dev.${date}00" | ||
canal_branch="release/v${version}-canal.${date}00" | ||
|
||
git checkout -b ${dev_branch} | ||
./scripts/update-version $1-dev.${date}00 | ||
git add --all | ||
git commit -m "update version" | ||
while true; do | ||
read -n1 -p "Do you wish to push and publish the dev build? [y/n] " yn | ||
echo "" | ||
case $yn in | ||
[Yy]* ) break;; | ||
[Nn]* ) exit;; | ||
* ) echo "Please answer y or n.";; | ||
esac | ||
done | ||
git push origin ${dev_branch} | ||
npm publish --tag dev | ||
|
||
git checkout $current_branch | ||
|
||
git checkout -b ${canal_branch} | ||
git apply ./scripts/canal-release.patch | ||
./scripts/update-version $1-canal.${date}00 | ||
git add --all | ||
git commit -m "update version" | ||
git push origin ${canal_branch} | ||
while true; do | ||
read -n1 -p "Do you wish to push and publish the dev build? [y/n] " yn | ||
echo "" | ||
case $yn in | ||
[Yy]* ) break;; | ||
[Nn]* ) exit;; | ||
* ) echo "Please answer y or n.";; | ||
esac | ||
done | ||
npm publish --tag canal |