Skip to content

Commit 7607d59

Browse files
committed
Fix version extraction for macOS app and release artifact
Update CMakeLists.txt to strip the leading 'v' from GIT_TAG instead of VERSION, ensuring the app bundle uses the correct version string including prerelease suffixes. Adjust release workflow to match DMG files with any version pattern.
1 parent 2ed38ff commit 7607d59

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ jobs:
9494
- name: Release
9595
uses: softprops/action-gh-release@v2
9696
with:
97-
files: "${{github.workspace}}/build/${{ matrix.config.preset }}/HDRView-${{ env.VERSION_NO_V }}-${{ matrix.config.arch }}.dmg"
97+
files: "${{github.workspace}}/build/${{ matrix.config.preset }}/HDRView-*-${{ matrix.config.arch }}.dmg"
9898
env:
9999
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
100100

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1486,8 +1486,8 @@ if(APPLE)
14861486
install(TARGETS HDRView BUNDLE DESTINATION . COMPONENT Runtime)
14871487
set(CPACK_GENERATOR "DragNDrop")
14881488

1489-
# Strip leading 'v' from VERSION if present for app naming
1490-
string(REGEX REPLACE "^v" "" VERSION_NO_V "${VERSION}")
1489+
# Strip leading 'v' from GIT_TAG to get full version with prerelease suffix
1490+
string(REGEX REPLACE "^v" "" VERSION_NO_V "${GIT_TAG}")
14911491

14921492
# Rename app bundle to include version
14931493
set(VERSIONED_APP_NAME "HDRView ${VERSION_NO_V}.app")

0 commit comments

Comments
 (0)