We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 42df9d0 + ea0cec5 commit 0f753beCopy full SHA for 0f753be
publish.sh
@@ -0,0 +1,25 @@
1
+#!/bin/bash
2
+
3
+# Publishes package to pypi and creates git tags.
4
+# Reads version from VERSION file.
5
+#
6
+# To register a package (before first publish):
7
+# python setup.py register
8
9
+version=`cat VERSION`
10
+changelog=CHANGELOG.md
11
+grep $version $changelog >> /dev/null
12
+if [[ $? -ne 0 ]]; then
13
+ echo "Couldn't find version $version in $changelog"
14
+ exit
15
+fi
16
17
+read -p "Publish and tag as v$version? " -n 1 -r
18
+if [[ $REPLY =~ ^[Yy]$ ]]; then
19
+ # publish to pypi
20
+ python setup.py sdist upload
21
22
+ # create git tags
23
+ git tag -a v$version -m "version $version"
24
+ git push --tags
25
0 commit comments