Skip to content

Commit

Permalink
fix: check git repo after parsing args
Browse files Browse the repository at this point in the history
  • Loading branch information
adhocore committed Aug 2, 2019
1 parent 00cb1a5 commit aa92bc6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions please
Original file line number Diff line number Diff line change
Expand Up @@ -160,12 +160,6 @@ publish-npm()
ok
}

REPO=`git config --get remote.origin.url | sed -e 's/git@github.com://;s/.git//'`
if [ "" == "$REPO" ]; then
error "$(pwd) is not git repo"
exit 1
fi

GCFMT="%s (%an)" # git commit log format

# argv parsing
Expand All @@ -186,6 +180,12 @@ do
esac
done

REPO=`git config --get remote.origin.url | sed -e 's/git@github.com://;s/.git//'`
if [ "" == "$REPO" ]; then
error "$(pwd) is not git repo"
exit 1
fi

GPUSH=0 # git push pending
MAJOR=${MAJOR:-0} # bump major
MINOR=${MINOR:-0} # bump minor
Expand Down

0 comments on commit aa92bc6

Please sign in to comment.