aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Smith <osmith@sysmocom.de>2021-01-29 15:24:48 +0100
committerOliver Smith <osmith@sysmocom.de>2021-01-29 16:11:06 +0100
commit6f5f4d6dd33f73063a3f56773dba3de268597775 (patch)
tree15c683871d7227208dfa1f9a7fc702b354605218
parent00b718176000f1a0f63f2f1ef04623cb4b03d768 (diff)
OBS nightly: don't try to use UNKNOWN as version
If the repository doesn't have a git tag yet, git-version-gen will set the version to UNKNOWN. The debian package build tools will choke on that, so fall back to using the version from debian/changelog. Related: OS#4992 (osmo-gbproxy.git doesn't have a tag just yet) Change-Id: I43c32f73bdfd715db5afdeec3bd8026d3c1fd8eb
-rwxr-xr-xscripts/osmocom-nightly-packages.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/osmocom-nightly-packages.sh b/scripts/osmocom-nightly-packages.sh
index a6340d1..44f4a6e 100755
--- a/scripts/osmocom-nightly-packages.sh
+++ b/scripts/osmocom-nightly-packages.sh
@@ -70,7 +70,7 @@ get_commit_version() {
version=$(echo "$version" | sed 's/-/./g' )
# deb version
- if [ -z "$version" ] ; then
+ if [ -z "$version" ] || [ "$version" = "UNKNOWN" ]; then
version=$(head -1 debian/changelog | cut -d ' ' -f 2 | sed 's,(,,' | sed 's,),,')
version="$version.$DT"
fi