From c5e6b84e3de97b5da26cf7fb341bb51480fa1083 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sun, 27 Feb 2022 12:17:30 -0500 Subject: [PATCH] Get version from CMakeLists --- .github/workflows/CI.yml | 24 ------------------------ CMakeLists.txt | 1 + gen-deb.in | 2 +- sunshine.desktop => sunshine.desktop.in | 2 +- 4 files changed, 3 insertions(+), 26 deletions(-) rename sunshine.desktop => sunshine.desktop.in (85%) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index e9de6a36..dce77cd2 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -51,30 +51,6 @@ jobs: echo Within 'CMakeLists.txt' change "project(Sunshine VERSION $cmakelists_version)" to "project(Sunshine VERSION ${{ needs.check_changelog.outputs.next_version_bare }})" exit 1 - - name: Check gen-deb.in Version - run: | - version=$(grep -o -E '^Version: [0-9]+\.[0-9]+\.[0-9]+' gen-deb.in | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+') - echo "gendeb_version=${version}" >> $GITHUB_ENV - - name: Compare gen-deb.in Version - if: ${{ env.gendeb_version != needs.check_changelog.outputs.next_version_bare }} - run: | - echo gen-deb.in version: "$gendeb_version" - echo Changelog version: "${{ needs.check_changelog.outputs.next_version_bare }}" - echo Within 'gen-deb.in' change "Version: $gendeb_version" to "Version: ${{ needs.check_changelog.outputs.next_version_bare }}" - exit 1 - - - name: Check sunshine.desktop Versions - run: | - version=$(grep -o -E '^X-AppImage-Version=[0-9]+\.[0-9]+\.[0-9]+' sunshine.desktop | grep -o -E '[0-9]+\.[0-9]+\.[0-9]+') - echo "appimage_version=${version}" >> $GITHUB_ENV - - name: Compare sunshine.desktop Versions - if: ${{ env.appimage_version != needs.check_changelog.outputs.next_version_bare }} - run: | - echo sunshine.desktop Version: "$appimage_version" - echo Changelog version: "${{ needs.check_changelog.outputs.next_version_bare }}" - echo Within 'sunshine.desktop' change "X-AppImage-Version=$appimage_version" to "X-AppImage-Version=${{ needs.check_changelog.outputs.next_version_bare }}" - exit 1 - build_appimage: name: AppImage runs-on: ubuntu-20.04 diff --git a/CMakeLists.txt b/CMakeLists.txt index fd624bdb..f9f1f5f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -313,6 +313,7 @@ else() set(SUNSHINE_EXECUTABLE_PATH "sunshine") endif() configure_file(gen-deb.in gen-deb @ONLY) + configure_file(sunshine.desktop.in sunshine.desktop @ONLY) configure_file(sunshine.service.in sunshine.service @ONLY) endif() diff --git a/gen-deb.in b/gen-deb.in index 39d585d4..25ca3609 100755 --- a/gen-deb.in +++ b/gen-deb.in @@ -37,7 +37,7 @@ Package: sunshine Architecture: amd64 Maintainer: @loki Priority: optional -Version: 0.12.0 +Version: @PROJECT_VERSION@ Depends: libssl1.1, libavdevice58, libboost-thread1.67.0 | libboost-thread1.71.0 | libboost-thread1.74.0, libboost-filesystem1.67.0 | libboost-filesystem1.71.0 | libboost-filesystem1.74.0, libboost-log1.67.0 | libboost-log1.71.0 | libboost-log1.74.0, libpulse0, libopus0, libxcb-shm0, libxcb-xfixes0, libxtst6, libevdev2, libdrm2, libcap2 Description: Gamestream host for Moonlight EOF diff --git a/sunshine.desktop b/sunshine.desktop.in similarity index 85% rename from sunshine.desktop rename to sunshine.desktop.in index 8773a035..195bade3 100644 --- a/sunshine.desktop +++ b/sunshine.desktop.in @@ -8,5 +8,5 @@ Icon=sunshine Categories=Utility; Terminal=true X-AppImage-Name=sunshine -X-AppImage-Version=0.12.0 +X-AppImage-Version=@PROJECT_VERSION@ X-AppImage-Arch=x86_64