diff options
Diffstat (limited to 'scripts/add-version-to-appdata.sh')
-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 |