mirror of
https://github.com/LizardByte/Sunshine.git
synced 2025-08-10 00:52:16 +00:00
build(linux): consolidate appstream metainfo (#3954)
This commit is contained in:
4
.github/workflows/CI.yml
vendored
4
.github/workflows/CI.yml
vendored
@@ -264,6 +264,8 @@ jobs:
|
||||
|
||||
build_linux:
|
||||
name: Linux ${{ matrix.type }}
|
||||
env:
|
||||
APP_ID: dev.lizardbyte.app.Sunshine
|
||||
runs-on: ubuntu-${{ matrix.dist }}
|
||||
needs: setup_release
|
||||
strategy:
|
||||
@@ -364,7 +366,7 @@ jobs:
|
||||
chmod +x ./AppDir/AppRun
|
||||
|
||||
# variables
|
||||
DESKTOP_FILE="${DESKTOP_FILE:-sunshine.desktop}"
|
||||
DESKTOP_FILE="${DESKTOP_FILE:-${APP_ID}.desktop}"
|
||||
ICON_FILE="${ICON_FILE:-sunshine.png}"
|
||||
|
||||
# AppImage
|
||||
|
||||
23
.github/workflows/update-flathub-repo.yml
vendored
23
.github/workflows/update-flathub-repo.yml
vendored
@@ -133,30 +133,11 @@ jobs:
|
||||
xml_file="flathub/${{ env.FLATHUB_PKG }}/${{ env.FLATHUB_PKG }}.metainfo.xml"
|
||||
|
||||
# Extract release information
|
||||
version="${{ github.event.release.tag_name }}" && version="${version#v}"
|
||||
date="${{ github.event.release.published_at }}" && date="${date%%T*}"
|
||||
changelog="${{ github.event.release.body }}" && changelog="${changelog//&/&}" && \
|
||||
changelog="${changelog//</<}" && changelog="${changelog//>/>}"
|
||||
|
||||
# Store the old release information into a temp file to be used for precise replacement
|
||||
tmpfile=$(mktemp)
|
||||
|
||||
# Match the existing <release> block, replace it with the new data
|
||||
awk -v version="$version" -v date="$date" -v changelog="$changelog" '
|
||||
BEGIN { replaced = 0 }
|
||||
/<release version=.*>/ {
|
||||
if (!replaced) {
|
||||
print " <release version=\"" version "\" date=\"" date "\">"
|
||||
print " <description><p>" changelog "</p></description>"
|
||||
print " </release>"
|
||||
replaced = 1
|
||||
}
|
||||
}
|
||||
!/<release version=.*>/ && !/<\/release>/ { print $0 }
|
||||
' "$xml_file" > "$tmpfile"
|
||||
|
||||
# Move the updated file back to the original location
|
||||
mv "$tmpfile" "$xml_file"
|
||||
# Replace changelog placeholder with actual changelog
|
||||
sed -i "s|<!-- changelog -->|$changelog|g" "$xml_file"
|
||||
|
||||
- name: Update submodule
|
||||
if: >-
|
||||
|
||||
Reference in New Issue
Block a user