Skip to content

Commit

Permalink
Merge pull request #71 from SunshineStream/improve-version-automation
Browse files Browse the repository at this point in the history
Get version from CMakeLists
  • Loading branch information
ReenigneArcher authored Feb 27, 2022
2 parents 68f35f6 + 1e91356 commit 9b2321a
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 27 deletions.
26 changes: 1 addition & 25 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -135,7 +111,7 @@ jobs:
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage && chmod +x linuxdeploy-x86_64.AppImage
./linuxdeploy-x86_64.AppImage --appdir ../AppDir -e ../appimage-build/sunshine -i "../$ICON_FILE" -d "../$DESKTOP_FILE" --output appimage
./linuxdeploy-x86_64.AppImage --appdir ../AppDir -e ../appimage-build/sunshine -i "../$ICON_FILE" -d "../appimage-build/$DESKTOP_FILE" --output appimage
mv sunshine*.AppImage sunshine.AppImage
mkdir sunshine && mv sunshine.AppImage sunshine/
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion gen-deb.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sunshine.desktop → sunshine.desktop.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9b2321a

Please sign in to comment.