summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2017-02-24 11:20:24 +0100
committervarac <varacanero@zeromail.org>2017-03-02 10:10:38 +0100
commit6e2adab763d48749c7638c73cc0506250807fe20 (patch)
tree879a22885a28c0b020cb81c9915b8560a0f3b6e7 /debian
parent5b70bf65f4ae63f3f5f97ba557e09a19f0a70604 (diff)
Freeze python version
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/freeze_python_version.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/freeze_python_version.sh b/debian/freeze_python_version.sh
new file mode 100755
index 0000000..65a9bac
--- /dev/null
+++ b/debian/freeze_python_version.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+VERSION_FILE="src/leap/mx/_version.py"
+rm ${VERSION_FILE}
+echo y | python setup.py freeze_debianver
+
+# Add the number of commits after last tag to the version string
+add_commits=$(git describe | cut -d'-' -f2)
+sed -i "/ \"version/s/\"$/-${add_commits}\"/" ${VERSION_FILE}
+
+# Remove the -dirty tag
+sed -i 's/-dirty//g' ${VERSION_FILE}
+
+git commit -m "[pkg] freeze debian version" ${VERSION_FILE}
+
+python setup.py version