mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
build-system: fix appdata creation
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>
This commit is contained in:
parent
3a79eb11e8
commit
b80fd26e81
1 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue