From 39bf035bbec6274ff8c87ad168a67907806bea1e Mon Sep 17 00:00:00 2001 From: Albrecht Lohofener Date: Mon, 16 Dec 2024 12:28:37 +0100 Subject: [PATCH] Add build date and git hash into Linux app metadata --- .github/workflows/linux.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index e085d84d..3ad6d26f 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -27,7 +27,7 @@ jobs: - name: Display environment variables run: env | sort - - name: Prepare flatpak build + - name: Install flatpak build dependencies run: | set -x @@ -35,6 +35,22 @@ jobs: sudo apt-get -y install flatpak-builder appstream-compose flatpak remote-add --if-not-exists --user flathub https://dl.flathub.org/repo/flathub.flatpakrepo + # For flatpak-builder-lint + flatpak install -y flathub org.flatpak.Builder + + - name: Prepare flatpak build + run: | + # Add current build date into appdata.xml + APPDATA_DATE=`date +%Y-%m-%d` + sed -i 's/date="1970-01-01"/'date=\""$APPDATA_DATE"\"'/g' io.welle.welle_io.appdata.xml + + # Add githash into appdata.xml + APPDATA_DATE_VERSION="2.6-unstable-$GIT_HASH" + sed -i 's/version="0.0.0"/'version=\""$APPDATA_DATE_VERSION"\"'/g' io.welle.welle_io.appdata.xml + + # Check if file "io.welle.welle_io.appdata.xml" is valid + flatpak run --command=flatpak-builder-lint org.flatpak.Builder appstream io.welle.welle_io.appdata.xml + - name: Build id: build run: |