Skip to content

Commit

Permalink
Fix issues with GitHub release workflow (#1926)
Browse files Browse the repository at this point in the history
  • Loading branch information
zorgiepoo authored Aug 29, 2021
1 parent b4e0dcc commit edc0fd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/create-draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ jobs:

- name: "Extract version information from project"
run: |
MARKETING_VERSION=$(xcrun xcodebuild -showBuildSettings -project Sparkle.xcodeproj | grep MARKETING_VERSION | grep -m 1 '^[[:space:]]*MARKETING_VERSION')
echo "MARKETING_VERSION=${MARKETING_VERSION}" >> $GITHUB_ENV~
MARKETING_VERSION=$(xcrun xcodebuild -showBuildSettings -project Sparkle.xcodeproj | grep -m 1 '^[[:space:]]*MARKETING_VERSION' | sed -E 's/.+=[[:space:]]+(.*)$/\1/')
echo "MARKETING_VERSION=${MARKETING_VERSION}" >> $GITHUB_ENV
- name: "Determine if this is a pre-release version"
run: |
SPARKLE_VERSION_SUFFIX=$(xcrun xcodebuild -showBuildSettings -project Sparkle.xcodeproj | grep SPARKLE_VERSION_SUFFIX | grep -m 1 '^[[:space:]]*SPARKLE_VERSION_SUFFIX')
SPARKLE_VERSION_SUFFIX=$(xcrun xcodebuild -showBuildSettings -project Sparkle.xcodeproj | grep -m 1 '^[[:space:]]*SPARKLE_VERSION_SUFFIX' | sed -E 's/.+=[[:space:]]+(.*)$/\1/')
if [[ ! -z "$SPARKLE_VERSION_SUFFIX" ]]; then
echo "PRERELEASE_VERSION=true" >> $GITHUB_ENV
else
echo "PRERELEASE_VERSION=false" >> $GITHUB_ENV
fi
- name: "Create a temporary Git tag"
run: git tag "$MARKETING_VERSION"
run: git tag "${{ env.MARKETING_VERSION }}"

- name: "Build release distribution"
run: make release
Expand Down
3 changes: 0 additions & 3 deletions Configurations/ConfigCommon.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@ SPARKLE_VERSION_PATCH = 0

// This should be in SemVer format or empty, ie. "-beta.1"
SPARKLE_VERSION_SUFFIX = -beta.1

CURRENT_PROJECT_VERSION = 2001

// Please be careful not to use MARKETING_VERSION as part of any other build settings.
// We extract this value during builds, and they would be exported at the same time.
MARKETING_VERSION = $(SPARKLE_VERSION_MAJOR).$(SPARKLE_VERSION_MINOR).$(SPARKLE_VERSION_PATCH)$(SPARKLE_VERSION_SUFFIX)
ALWAYS_SEARCH_USER_PATHS = NO
ENABLE_STRICT_OBJC_MSGSEND = YES
Expand Down

0 comments on commit edc0fd0

Please sign in to comment.