summaryrefslogtreecommitdiff
path: root/debian/freeze_python_version.sh
blob: 65a9bacc2b13b3906750dc59a4502d46d930f4d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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