diff --git a/Configurations/make-release-package.sh b/Configurations/make-release-package.sh index f50463f94..278c522d5 100755 --- a/Configurations/make-release-package.sh +++ b/Configurations/make-release-package.sh @@ -34,9 +34,9 @@ if [ "$ACTION" = "" ] ; then mkdir -p "$CONFIGURATION_BUILD_DIR/staging" mkdir -p "$CONFIGURATION_BUILD_DIR/staging-spm" - cp "$SRCROOT/CHANGELOG" "$SRCROOT/LICENSE" "$SRCROOT/INSTALL" "$SRCROOT/Resources/SampleAppcast.xml" "$CONFIGURATION_BUILD_DIR/staging" - cp "$SRCROOT/CHANGELOG" "$SRCROOT/LICENSE" "$SRCROOT/INSTALL" "$SRCROOT/Resources/SampleAppcast.xml" "$CONFIGURATION_BUILD_DIR/staging-spm" - cp -R "$SRCROOT/bin" "$CONFIGURATION_BUILD_DIR/staging" + cp "$PROJECT_DIR/CHANGELOG" "$PROJECT_DIR/LICENSE" "$PROJECT_DIR/INSTALL" "$PROJECT_DIR/Resources/SampleAppcast.xml" "$CONFIGURATION_BUILD_DIR/staging" + cp "$PROJECT_DIR/CHANGELOG" "$PROJECT_DIR/LICENSE" "$PROJECT_DIR/INSTALL" "$PROJECT_DIR/Resources/SampleAppcast.xml" "$CONFIGURATION_BUILD_DIR/staging-spm" + cp -R "$PROJECT_DIR/bin" "$CONFIGURATION_BUILD_DIR/staging" cp "$CONFIGURATION_BUILD_DIR/BinaryDelta" "$CONFIGURATION_BUILD_DIR/staging/bin" cp "$CONFIGURATION_BUILD_DIR/generate_appcast" "$CONFIGURATION_BUILD_DIR/staging/bin" cp "$CONFIGURATION_BUILD_DIR/generate_keys" "$CONFIGURATION_BUILD_DIR/staging/bin" @@ -50,8 +50,8 @@ if [ "$ACTION" = "" ] ; then mkdir -p "$CONFIGURATION_BUILD_DIR/staging/Entitlements" mkdir -p "$CONFIGURATION_BUILD_DIR/staging-spm/Entitlements" - cp -R "$SRCROOT/Downloader/org.sparkle-project.Downloader.entitlements" "$CONFIGURATION_BUILD_DIR/staging/Entitlements/$DOWNLOADER_NAME.entitlements" - cp -R "$SRCROOT/Downloader/org.sparkle-project.Downloader.entitlements" "$CONFIGURATION_BUILD_DIR/staging-spm/Entitlements/$DOWNLOADER_NAME.entitlements" + cp -R "$PROJECT_DIR/Downloader/org.sparkle-project.Downloader.entitlements" "$CONFIGURATION_BUILD_DIR/staging/Entitlements/$DOWNLOADER_NAME.entitlements" + cp -R "$PROJECT_DIR/Downloader/org.sparkle-project.Downloader.entitlements" "$CONFIGURATION_BUILD_DIR/staging-spm/Entitlements/$DOWNLOADER_NAME.entitlements" fi mkdir -p "$CONFIGURATION_BUILD_DIR/staging/Symbols" @@ -119,7 +119,7 @@ if [ "$ACTION" = "" ] ; then rm -rf "$CONFIGURATION_BUILD_DIR/staging" # Get latest git tag - cd "$SRCROOT" + cd "$PROJECT_DIR" latest_git_tag=$( git describe --tags --abbrev=0 || true ) if [ -n "$latest_git_tag" ] ; then @@ -138,7 +138,7 @@ if [ "$ACTION" = "" ] ; then rm -rf "/tmp/sparkle-spm-extract" rm -rf "$CONFIGURATION_BUILD_DIR/staging-spm" - cd "$SRCROOT" + cd "$PROJECT_DIR" # Check semantic versioning if [[ $latest_git_tag =~ ^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$ ]]; then @@ -150,9 +150,9 @@ if [ "$ACTION" = "" ] ; then # Generate new Package manifest, podspec, and carthage files cd "$CONFIGURATION_BUILD_DIR" - cp "$SRCROOT/Package.swift" "$CONFIGURATION_BUILD_DIR" - cp "$SRCROOT/Sparkle.podspec" "$CONFIGURATION_BUILD_DIR" - cp "$SRCROOT/Carthage-dev.json" "$CONFIGURATION_BUILD_DIR" + cp "$PROJECT_DIR/Package.swift" "$CONFIGURATION_BUILD_DIR" + cp "$PROJECT_DIR/Sparkle.podspec" "$CONFIGURATION_BUILD_DIR" + cp "$PROJECT_DIR/Carthage-dev.json" "$CONFIGURATION_BUILD_DIR" fi if [ -z "$latest_git_tag" ] ; then @@ -162,7 +162,7 @@ if [ "$ACTION" = "" ] ; then spm_checksum=$(swift package compute-checksum "Sparkle-for-Swift-Package-Manager.zip") rm -rf ".build" sed -E -i '' -e "/let tag/ s/\".+\"/\"$latest_git_tag\"/" -e "/let version/ s/\".+\"/\"$MARKETING_VERSION\"/" -e "/let checksum/ s/[[:xdigit:]]{64}/$spm_checksum/" "Package.swift" - cp "Package.swift" "$SRCROOT" + cp "Package.swift" "$PROJECT_DIR" echo "Package.swift updated with the following values:" echo "Version: $MARKETING_VERSION" echo "Tag: $latest_git_tag" @@ -170,10 +170,10 @@ if [ "$ACTION" = "" ] ; then sed -E -i '' -e "/s\.version.+=/ s/\".+\"/\"$MARKETING_VERSION\"/" "Sparkle.podspec" - "$SRCROOT/Configurations/update-carthage.py" "Carthage-dev.json" "$MARKETING_VERSION" - cp "Sparkle.podspec" "$SRCROOT" + "$PROJECT_DIR/Configurations/update-carthage.py" "Carthage-dev.json" "$MARKETING_VERSION" + cp "Sparkle.podspec" "$PROJECT_DIR" # Note the Carthage-dev.json file will finally be copied to the website repo in Carthage/Sparkle.json in the end - cp "Carthage-dev.json" "$SRCROOT" + cp "Carthage-dev.json" "$PROJECT_DIR" echo "Sparkle.podspec and Carthage-dev.json updated with following values:" echo "Version: $MARKETING_VERSION" else diff --git a/Configurations/set-git-version-info.sh b/Configurations/set-git-version-info.sh index dad11200e..64ba41438 100755 --- a/Configurations/set-git-version-info.sh +++ b/Configurations/set-git-version-info.sh @@ -5,7 +5,7 @@ if ! which -s git ; then exit 0 fi -if [ -z "$SRCROOT" ] || \ +if [ -z "$PROJECT_DIR" ] || \ [ -z "$BUILT_PRODUCTS_DIR" ] || \ [ -z "$INFOPLIST_PATH" ] || \ [ -z "$MARKETING_VERSION" ]; then @@ -16,7 +16,7 @@ fi version="$MARKETING_VERSION" # Get version in format 1.x.x-commits-hash -gitversion=$( cd "$SRCROOT"; git describe --tags --match '[12].*' || true ) +gitversion=$( cd "$PROJECT_DIR"; git describe --tags --match '[12].*' || true ) if [ -z "$gitversion" ] ; then echo "$0: Can't find a Git hash!" 1>&2 exit 0 diff --git a/Sparkle.xcodeproj/project.pbxproj b/Sparkle.xcodeproj/project.pbxproj index 2ef085f53..26cc06228 100644 --- a/Sparkle.xcodeproj/project.pbxproj +++ b/Sparkle.xcodeproj/project.pbxproj @@ -2614,7 +2614,7 @@ /* Begin PBXLegacyTarget section */ 14732BC51960F69300593899 /* Distribution */ = { isa = PBXLegacyTarget; - buildArgumentsString = "$(SRCROOT)/Configurations/make-release-package.sh $(ACTION)"; + buildArgumentsString = "$(PROJECT_DIR)/Configurations/make-release-package.sh $(ACTION)"; buildConfigurationList = 14732BC61960F69300593899 /* Build configuration list for PBXLegacyTarget "Distribution" */; buildPhases = ( ); @@ -3283,7 +3283,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"$SRCROOT/Configurations/set-git-version-info.sh\"\n"; + shellScript = "\"$PROJECT_DIR/Configurations/set-git-version-info.sh\"\n"; showEnvVarsInLog = 0; }; 72045CE626FEE8CC004F96E5 /* Strip Framework */ = { @@ -3303,7 +3303,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"$SRCROOT/Configurations/strip-framework.sh\"\n"; + shellScript = "\"$PROJECT_DIR/Configurations/strip-framework.sh\"\n"; }; 720B4C2125EBFAA5005A0592 /* Run Script: Link Tools */ = { isa = PBXShellScriptBuildPhase; @@ -3322,7 +3322,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"$SRCROOT/Configurations/link-tools.sh\"\n"; + shellScript = "\"$PROJECT_DIR/Configurations/link-tools.sh\"\n"; }; 895C5DC524D78E460058A82D /* ShellScript */ = { isa = PBXShellScriptBuildPhase; @@ -3339,7 +3339,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"$SRCROOT/Configurations/make-xcframework.sh\"\n"; + shellScript = "\"$PROJECT_DIR/Configurations/make-xcframework.sh\"\n"; }; /* End PBXShellScriptBuildPhase section */ diff --git a/Sparkle/SUStatus.xib b/Sparkle/SUStatus.xib index 4dad9ce6d..99b2aad8e 100644 --- a/Sparkle/SUStatus.xib +++ b/Sparkle/SUStatus.xib @@ -1,8 +1,8 @@ - + - +