Skip to content

Commit

Permalink
Get newer bump.sh from discogs_client repo
Browse files Browse the repository at this point in the history
  • Loading branch information
JOJ0 committed Apr 6, 2022
1 parent f05ca87 commit a9ff304
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions bump.sh
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
#!/bin/bash
# Wrapper script for bumpversion/bump2version python package.
# Requires: pip install bump2version
#
# Increments major, minor or patch part of version in configured files
# (.bumpversion.cfg). Can be savely executed to see what would be bumped. To
# really change and commit, a second cli arg "doit" has to be passed.

#set -x
DRY="echo"
PART=$1

which bump2version
if [ $? != 0 ]; then
echo "bump2version package missing."
exit 1
fi

if [ -z $1 ]; then
echo "Bumps version, commits and tags."
echo "Usage: ./bump.s <major|minor|patch> [doit]"
echo "Usage: $0 <major|minor|patch> [doit]"
exit 0
fi

if [[ "$2" == "doit" ]]; then
DRY=""
else
echo -e "\nTHIS IS A DRY-RUN\n"
fi

if [[ "$2" == "doit" ]]; then
bumpversion $PART --verbose
echo "All good? Then push with:"
echo ""
echo "All good? Then push commits and tags:"
echo "git push --follow-tags"
else
echo -e "\nTHIS IS A DRY-RUN\n"
bumpversion $PART --verbose --dry-run
fi

0 comments on commit a9ff304

Please sign in to comment.