-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbump-version.sh
executable file
·49 lines (42 loc) · 1.55 KB
/
bump-version.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#! /bin/bash
BUMP=${1-minor}
MESSAGE=${2-"No description provided. Deal with it."}
export EDITOR=${EDITOR-"code --wait"}
echo
echo " ******* gpx2artdata versioning ********* "
echo " *** *** "
echo " *** ok, this is final *** "
echo " *** *** "
echo " ******* e l e k t r o s l ö j d ******** "
echo
if [ -z "$(git status --untracked-files=no --porcelain)" ]; then
hatch version $BUMP
VERSION="v$(hatch version)"
git-changelog -B $VERSION
echo "# $VERSION" > requirements.txt
pip freeze >> requirements.txt
echo -e "# Version $VERSION - $(date)\n\n$(cat RELEASE.md)" > RELEASE.md
echo "Provide a witty release description ..."
$EDITOR RELEASE.md
git add .
git status
read -p "Happy (y/n)? " CONT
if [ "$CONT" = "y" ]; then
git
git commit -m "Version $VERSION"
git tag -fa $VERSION -m "$MESSAGE"
echo
echo " *************** done! **************** "
echo " *** *** "
echo " *** congratulations! *** "
echo " *** please git push --tags *** "
echo " *** if you're serious *** "
echo " *** *** "
echo " ******* e l e k t r o s l ö j d ******** "
echo
else
echo "Aborted on operator request. Your tree is dirty."
fi
else
echo Aborting: we do not bump version when there are uncommitted changes in this house
fi