forked from SlideRuleEarth/sliderule-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRELEASE.sh
More file actions
executable file
·34 lines (29 loc) · 719 Bytes
/
RELEASE.sh
File metadata and controls
executable file
·34 lines (29 loc) · 719 Bytes
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
#
# Acceptable version identifier is x.y.z, e.g. 1.0.4
# the version number is then prepended with 'v' for
# the tags annotation in git.
#
VERSION=$1
if [[ "$VERSION" != "v"*"."*"."* ]]; then
echo "Invalid version number"
exit 1
fi
if git tag -l | grep -w $VERSION; then
echo "Git tag already exists"
exit 1
fi
#
# Clean up any previously attempted archives
#
rm sliderule-python-$VERSION.tar.gz 2> /dev/null
#
# Update version in local repository
#
echo $VERSION > version.txt
git add version.txt
git commit -m "Version $VERSION"
#
# Create tag and acrhive
#
git tag -a $VERSION -m "version $VERSION"
git archive --format=tar.gz --prefix=sliderule-python/ $VERSION > sliderule-python-$VERSION.tar.gz