summaryrefslogtreecommitdiffstats
path: root/scripts/add-version-to-appdata.sh
diff options
context:
space:
mode:
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