From edc0fd0e561c984aff00b73b93469d0e64e264db Mon Sep 17 00:00:00 2001 From: Mayur Pawashe Date: Sat, 28 Aug 2021 18:53:42 -0700 Subject: [PATCH] Fix issues with GitHub release workflow (#1926) --- .github/workflows/create-draft-release.yml | 8 ++++---- Configurations/ConfigCommon.xcconfig | 3 --- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/create-draft-release.yml b/.github/workflows/create-draft-release.yml index 251a3b61..1fb20e15 100644 --- a/.github/workflows/create-draft-release.yml +++ b/.github/workflows/create-draft-release.yml @@ -25,12 +25,12 @@ 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 @@ -38,7 +38,7 @@ jobs: 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 diff --git a/Configurations/ConfigCommon.xcconfig b/Configurations/ConfigCommon.xcconfig index 6dbb78b9..ebebf515 100644 --- a/Configurations/ConfigCommon.xcconfig +++ b/Configurations/ConfigCommon.xcconfig @@ -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