Skip to content

Commit

Permalink
Fix main branch check (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavel-kuznetsov-hypertrack authored Jan 31, 2024
1 parent 3923476 commit bba15b7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ open-docs: docs
push-tag:
#!/usr/bin/env sh
set -euo pipefail
if [ $(git symbolic-ref --short HEAD) = "master" ] ; then
if [ $(git symbolic-ref --short HEAD) = "main" ] ; then
VERSION=$(just version)
git tag $VERSION
git push origin $VERSION
else
echo "You are not on master branch"
echo "You are not on main branch"
fi
release publish="dry-run": build
Expand All @@ -66,7 +66,7 @@ release publish="dry-run": build
VERSION=$(just version)
if [ {{publish}} = "publish" ]; then
BRANCH=$(git branch --show-current)
if [ $BRANCH != "master" ]; then
if [ $BRANCH != "main" ]; then
echo "You must be on main branch to publish a new version (current branch: $BRANCH))"
exit 1
fi
Expand Down

0 comments on commit bba15b7

Please sign in to comment.