diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2018-09-29 10:54:12 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-09-29 12:09:11 -0700 |
commit | b80fd26e81d5de5c3b6871a565e8f7449df16bc5 (patch) | |
tree | 6903ccbe93e176a68fc2ee971fd3b4aa96df19e7 | |
parent | 3a79eb11e8096c34ecb06099a033d2a8fdb5c7c6 (diff) | |
download | subsurface-b80fd26e81d5de5c3b6871a565e8f7449df16bc5.tar.gz |
build-system: fix appdata creationv4.8.3
The pipe in the execution apparently didn't fail, so the date wasn't set
when building from a tar file.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rwxr-xr-x | scripts/add-version-to-appdata.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/add-version-to-appdata.sh b/scripts/add-version-to-appdata.sh index 7d48e840a..930db44ae 100755 --- a/scripts/add-version-to-appdata.sh +++ b/scripts/add-version-to-appdata.sh @@ -5,6 +5,9 @@ # this will, however, fail for plain tar balls create via git archive SCRIPT_DIR="$( cd "${BASH_SOURCE%/*}" ; pwd )" -version=$(git describe --abbrev=12) || version=$(cat "$SCRIPT_DIR"/../.gitversion) -date=$(git log -1 --format="%ct" | xargs -I{} date -d @{} +%Y-%m-%d) || date=$(cat "$SCRIPT_DIR"/../.gitdate) -sed -e "s|<release version=\"\" date=\"\" />|<release version=\"$version\" date=\"$date\" />|" appdata/subsurface.appdata.xml.in > appdata/subsurface.appdata.xml +VERSION=$(git describe --abbrev=12) || VERSION=$(cat "$SCRIPT_DIR"/../.gitversion) +DATE=$(git log -1 --format="%ct" | xargs -I{} date -d @{} +%Y-%m-%d) +if [ "$DATE" = "" ] ; then + DATE=$(cat "$SCRIPT_DIR"/../.gitdate) +fi +sed -e "s|<release version=\"\" date=\"\" />|<release version=\"$VERSION\" date=\"$DATE\" />|" appdata/subsurface.appdata.xml.in > appdata/subsurface.appdata.xml |