File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 5
5
# the tags annotation in git.
6
6
#
7
7
VERSION=$1
8
- if [[ " $VERSION " != * " ." * " ." * ]]; then
8
+ if [[ " $VERSION " != " v " * " ." * " ." * ]]; then
9
9
echo " Invalid version number"
10
10
exit 1
11
11
fi
12
- if git tag -l | grep -w v $VERSION ; then
12
+ if git tag -l | grep -w $VERSION ; then
13
13
echo " Git tag already exists"
14
14
exit 1
15
15
fi
@@ -24,11 +24,11 @@ rm sliderule-python-$VERSION.tar.gz 2> /dev/null
24
24
#
25
25
echo $VERSION > version.txt
26
26
git add version.txt
27
- git commit -m " Version v $VERSION "
27
+ git commit -m " Version $VERSION "
28
28
29
29
#
30
30
# Create tag and acrhive
31
31
#
32
- git tag -a v $VERSION -m " version $VERSION "
33
- git archive --format=tar.gz --prefix=sliderule-python/ v $VERSION > sliderule-python-$VERSION .tar.gz
32
+ git tag -a $VERSION -m " version $VERSION "
33
+ git archive --format=tar.gz --prefix=sliderule-python/ $VERSION > sliderule-python-$VERSION .tar.gz
34
34
Original file line number Diff line number Diff line change 12
12
# get version
13
13
with open ('version.txt' ) as fh :
14
14
version = fh .read ().strip ()
15
+ if version [0 ] == 'v' :
16
+ version = version [1 :]
15
17
16
18
# list of all utility scripts to be included with package
17
19
scripts = [os .path .join ('utils' ,f ) for f in os .listdir ('utils' ) if f .endswith ('.py' )]
You can’t perform that action at this time.
0 commit comments