Skip to content

Commit

Permalink
changes to add dev and release scripts as per supertokens/supertokens…
Browse files Browse the repository at this point in the history
  • Loading branch information
NkxxkN authored Dec 1, 2020
1 parent 130b3d6 commit e4e2628
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
16 changes: 15 additions & 1 deletion addDevTag
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# check if we need to merge master into this branch------------
if [[ $(git log master ^HEAD) ]]; then
echo "You need to merge master into this branch. Exiting"
exit 1
fi

# get version------------
version=`cat package.json | grep -e '"version":'`

Expand Down Expand Up @@ -60,7 +66,15 @@ then
exit 1
fi


# add an empty commit if the user has not given a commit hash so that we are sure it's built------------
if [ $# -eq 0 ]
then
npm run build-pretty
git add --all
git commit --allow-empty -m"adding dev-v$version tag to this commit to ensure building"
git push
commit_hash=`git log --pretty=format:'%H' -n 1`
fi

git tag dev-v$version $commit_hash
git push --tags
8 changes: 4 additions & 4 deletions addReleaseTag
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ then
if [[ $branch_name == "(unnamed branch)" ]]
then
echo "git checkout -b forrelease"
echo "git merge -s ours master"
echo "git merge master"
echo "git checkout master"
echo "git merge forrelease"
echo "git push"
echo "git checkout forrelease"
exit 1
else
echo "git merge -s ours master"
echo "git merge master"
echo "git checkout master"
echo "git merge $branch_name"
echo "git push"
Expand All @@ -136,14 +136,14 @@ then
if [[ $branch_name == "(unnamed branch)" ]]
then
git checkout -b forrelease
git merge -s ours master
git merge master
git checkout master
git merge forrelease
git push
git checkout forrelease
echo "Done! Please delete this branch"
else
git merge -s ours master
git merge master
git checkout master
git merge $branch_name
git push
Expand Down

0 comments on commit e4e2628

Please sign in to comment.