diff --git a/.github/workflows/reusable-release.yml b/.github/workflows/reusable-release.yml index 4e0e7222..d632e118 100644 --- a/.github/workflows/reusable-release.yml +++ b/.github/workflows/reusable-release.yml @@ -160,7 +160,6 @@ jobs: macos-bundle: name: macOS app bundle (${{ matrix.goarch }}) - needs: [goreleaser] runs-on: macos-latest strategy: matrix: @@ -181,7 +180,12 @@ jobs: cd webui && pnpm install && pnpm run build - name: Get version id: version - run: echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" + run: | + if [[ "$GITHUB_REF" == refs/tags/v* ]]; then + echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT" + else + echo "version=0.0.0-snapshot-${GITHUB_SHA::8}" >> "$GITHUB_OUTPUT" + fi - name: Build binary env: CGO_ENABLED: "1" diff --git a/build/darwin/bundle.sh b/build/darwin/bundle.sh index 72847b1b..4a33dc90 100755 --- a/build/darwin/bundle.sh +++ b/build/darwin/bundle.sh @@ -44,7 +44,7 @@ LAUNCHER chmod +x "$APP_DIR/Contents/MacOS/backrest-launcher" # Generate Info.plist with version -sed "s/__VERSION__/$VERSION/g" "$SCRIPT_DIR/Info.plist" > "$APP_DIR/Contents/Info.plist" +sed "s|__VERSION__|$VERSION|g" "$SCRIPT_DIR/Info.plist" > "$APP_DIR/Contents/Info.plist" # Generate .icns from the PNG icon ICON_PNG="$SCRIPT_DIR/icon.png"