Skip to content

Commit

Permalink
Add build date and git hash into Linux app metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
AlbrechtL committed Dec 16, 2024
1 parent 78260b2 commit 39bf035
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,30 @@ jobs:
- name: Display environment variables
run: env | sort

- name: Prepare flatpak build
- name: Install flatpak build dependencies
run: |
set -x
# Install build dependencies
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: |
Expand Down

0 comments on commit 39bf035

Please sign in to comment.