diff options
Diffstat (limited to 'debian')
-rwxr-xr-x | debian/freeze_python_version.sh | 16 |
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 |