Skip to content

Commit

Permalink
Add make-dev-releases script
Browse files Browse the repository at this point in the history
  • Loading branch information
peaBerberian committed Dec 6, 2023
1 parent 4b0e969 commit 7cb8d1e
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions scripts/make-dev-releases
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

0 comments on commit 7cb8d1e

Please sign in to comment.