From 26d8beb7668d88124a954c163de9b1ce1b082c39 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 15 Sep 2018 07:27:07 -0700 Subject: [PATCH] build-system: don't modify a file under git control Instead of editing appdata/subsurface.appdata.xml in place, switch to our usual pattern of modifying a .in file and add the resulting file to .gitignore. Signed-off-by: Dirk Hohndel --- .gitignore | 1 + appdata/{subsurface.appdata.xml => subsurface.appdata.xml.in} | 0 scripts/add-version-to-appdata.sh | 2 +- 3 files changed, 2 insertions(+), 1 deletion(-) rename appdata/{subsurface.appdata.xml => subsurface.appdata.xml.in} (100%) diff --git a/.gitignore b/.gitignore index 19e54b349..17ec19f15 100644 --- a/.gitignore +++ b/.gitignore @@ -38,3 +38,4 @@ mobile-widgets/qml/kirigami packaging/ios/install-root packaging/ios/Info.plist packaging/ios/Qt +appdata/subsurface.appdata.xml diff --git a/appdata/subsurface.appdata.xml b/appdata/subsurface.appdata.xml.in similarity index 100% rename from appdata/subsurface.appdata.xml rename to appdata/subsurface.appdata.xml.in diff --git a/scripts/add-version-to-appdata.sh b/scripts/add-version-to-appdata.sh index a9f3b98ea..a0d8e1f5d 100755 --- a/scripts/add-version-to-appdata.sh +++ b/scripts/add-version-to-appdata.sh @@ -1,4 +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|||" -i appdata/subsurface.appdata.xml +sed -e "s|||" appdata/subsurface.appdata.xml.in > appdata/subsurface.appdata.xml