summaryrefslogtreecommitdiffstats
path: root/scripts/add-version-to-appdata.sh
diff options
context:
space:
mode:
authorGravatar Alexander Wilms <f.alexander.wilms@gmail.com>2018-09-03 22:04:50 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-09 18:43:30 -0700
commitbcf568586de30be23bd5ff37746b6b4eb1140167 (patch)
treef69e7d1cd000457e816b42a684ad1eb150bb350e /scripts/add-version-to-appdata.sh
parent39b52d8abff9f8bd91c5e5031eb8f9f48a92f3bb (diff)
downloadsubsurface-bcf568586de30be23bd5ff37746b6b4eb1140167.tar.gz
Fix appdata
Use correct format, create script to update the version and release date in the appdata. [Dirk Hohndel: call said script during the build process] Signed-off-by: Alexander Wilms <f.alexander.wilms@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'scripts/add-version-to-appdata.sh')
-rwxr-xr-xscripts/add-version-to-appdata.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/add-version-to-appdata.sh b/scripts/add-version-to-appdata.sh
new file mode 100755
index 000000000..a9f3b98ea
--- /dev/null
+++ b/scripts/add-version-to-appdata.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+version=$(git describe --abbrev=12)
+date=$(git log -1 --format="%at" | xargs -I{} date -d @{} +%Y-%m-%d)
+sed -e "s|<release version=\"\" date=\"\" />|<release version=\"$version\" date=\"$date\" />|" -i appdata/subsurface.appdata.xml