diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3ffef6a615b..47972fa9207 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -211,6 +211,7 @@ jobs: then echo "This is a PUSH event" branch=${{ github.ref_name }} + build_version=${{ needs.check_changelog.outputs.next_version }} commit=${{ github.sha }} clone_url=${{ github.event.repository.clone_url }} else @@ -227,6 +228,7 @@ jobs: cd build cmake -DGITHUB_CLONE_URL=${clone_url} \ + -DBUILD_VERSION=${build_version} \ -DGITHUB_BRANCH=${branch} \ -DGITHUB_COMMIT=${commit} \ -DSUNSHINE_CONFIGURE_FLATPAK_MAN=ON \ @@ -377,7 +379,7 @@ jobs: - name: Build Linux env: BRANCH: ${{ github.head_ref || github.ref_name }} - BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }} + BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version }} COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} timeout-minutes: 5 run: | @@ -565,13 +567,16 @@ jobs: if [ -z "$branch" ] then echo "This is a PUSH event" + build_version=${{ needs.check_changelog.outputs.next_version }} clone_url=${{ github.event.repository.clone_url }} branch="${{ github.ref_name }}" + commit=${{ github.sha }} default_branch="${{ github.event.repository.default_branch }}" else echo "This is a PR event" clone_url=${{ github.event.pull_request.head.repo.clone_url }} branch="${{ github.event.pull_request.head.ref }}" + commit=${{ github.event.pull_request.head.sha }} default_branch="${{ github.event.pull_request.head.repo.default_branch }}" fi echo "Branch: ${branch}" @@ -580,7 +585,9 @@ jobs: mkdir build cd build cmake \ + -DBUILD_VERSION="${build_version}" \ -DGITHUB_BRANCH="${branch}" \ + -DGITHUB_COMMIT="${commit}" \ -DGITHUB_CLONE_URL="${clone_url}" \ -DGITHUB_DEFAULT_BRANCH="${default_branch}" \ -DSUNSHINE_CONFIGURE_HOMEBREW=ON \ @@ -678,6 +685,8 @@ jobs: if [ -z "$branch" ] then echo "This is a PUSH event" + branch="${{ github.ref_name }}" + build_version=${{ needs.check_changelog.outputs.next_version }} commit=${{ github.sha }} clone_url=${{ github.event.repository.clone_url }} else @@ -691,6 +700,8 @@ jobs: mkdir build cd build cmake \ + -DBUILD_VERSION=${build_version} \ + -DGITHUB_BRANCH=${branch} \ -DGITHUB_COMMIT=${commit} \ -DGITHUB_CLONE_URL=${clone_url} \ -DSUNSHINE_CONFIGURE_PORTFILE=ON \ @@ -1024,7 +1035,7 @@ jobs: shell: msys2 {0} env: BRANCH: ${{ github.head_ref || github.ref_name }} - BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version_bare }} + BUILD_VERSION: ${{ needs.check_changelog.outputs.next_version }} COMMIT: ${{ github.event.pull_request.head.sha || github.sha }} run: | mkdir build diff --git a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml index 0e891dacf0e..cba627807c3 100644 --- a/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml +++ b/packaging/linux/flatpak/dev.lizardbyte.sunshine.yml @@ -329,6 +329,9 @@ modules: build-args: - --share=network env: + BUILD_VERSION: "@BUILD_VERSION@" + BRANCH: "@GITHUB_BRANCH@" + COMMIT: "@GITHUB_COMMIT@" npm_config_nodedir: /usr/lib/sdk/node18 NPM_CONFIG_LOGLEVEL: info config-opts: diff --git a/packaging/macos/Portfile b/packaging/macos/Portfile index aacc3209fff..e0cc9ef34f6 100644 --- a/packaging/macos/Portfile +++ b/packaging/macos/Portfile @@ -51,6 +51,10 @@ configure.args -DBUILD_WERROR=ON \ -DCMAKE_INSTALL_PREFIX=${prefix} \ -DSUNSHINE_ASSETS_DIR=etc/sunshine/assets +configure.env-append BRANCH=@GITHUB_BRANCH@ +configure.env-append BUILD_VERSION=@BUILD_VERSION@ +configure.env-append COMMIT=@GITHUB_COMMIT@ + startupitem.create yes startupitem.executable "${prefix}/bin/{$name}" startupitem.location LaunchDaemons diff --git a/packaging/macos/sunshine.rb b/packaging/macos/sunshine.rb index 1853c0c8c75..e119d1df1a7 100644 --- a/packaging/macos/sunshine.rb +++ b/packaging/macos/sunshine.rb @@ -19,6 +19,10 @@ class @PROJECT_NAME@ < Formula depends_on "opus" def install + ENV["BRANCH"] = "@GITHUB_BRANCH@" + ENV["BUILD_VERSION"] = "@BUILD_VERSION@" + ENV["COMMIT"] = "@GITHUB_COMMIT@" + args = %W[ -DBUILD_WERROR=ON -DCMAKE_INSTALL_PREFIX=#{prefix} diff --git a/src_assets/common/assets/web/index.html b/src_assets/common/assets/web/index.html index 12199711422..16dff05b921 100644 --- a/src_assets/common/assets/web/index.html +++ b/src_assets/common/assets/web/index.html @@ -112,10 +112,16 @@