Move update_version.sh to contrib/

Change-Id: I26218cd512a739fc26ba04be05f01260152d785f
This commit is contained in:
Pau Espin 2020-05-12 13:38:32 +02:00
parent 1337fb8e48
commit 656952760c
3 changed files with 7 additions and 6 deletions

2
.gitignore vendored
View File

@ -1,7 +1,7 @@
__pycache__
pid
.*.sw?
version
.version
_version.py
tags
set_pythonpath

View File

@ -6,7 +6,7 @@ deps:
./contrib/check_dependencies.py
version:
./update_version.sh
./contrib/update_version.sh
manual:
$(MAKE) -C doc/manuals

View File

@ -1,10 +1,11 @@
#!/bin/sh
set -e
git describe --abbrev=8 --dirty | sed 's/v\([^-]*\)-\([^-]*\)-\(.*\)/\1.dev\2.\3/' > version
cat version
ROOTDIR=$(git rev-parse --show-toplevel)
git describe --abbrev=8 --dirty | sed 's/v\([^-]*\)-\([^-]*\)-\(.*\)/\1.dev\2.\3/' > $ROOTDIR/.version
cat $ROOTDIR/.version
echo "# osmo-gsm-tester version.
# Automatically generated by update_version.sh.
# Gets imported by __init__.py.
_version = '$(cat version)'" \
> src/osmo_gsm_tester/_version.py
_version = '$(cat $ROOTDIR/.version)'" \
> $ROOTDIR/src/osmo_gsm_tester/_version.py