Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
agents:
queue: "macOS-Monterey-12-4"

steps:
- command: "./scripts/run-unit-tests.sh MuxUploadSDK"
label: ":xcode_simulator: Unit Tests"
- wait
- command: "./scripts/version-check.sh"
label: ":clipboard: Version Check"
16 changes: 0 additions & 16 deletions .github/workflows/run-tests.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/validate-release.yml

This file was deleted.

6 changes: 1 addition & 5 deletions scripts/run-unit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ then
exit 1
fi

echo "▸ Selecting Xcode 15.4"

sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer

echo "▸ Using Xcode Version: ${XCODE}"

echo "▸ Available Xcode SDKs"
Expand All @@ -40,5 +36,5 @@ echo "▸ Test ${SCHEME}"
xcodebuild clean test \
-scheme $SCHEME \
-destination 'platform=iOS Simulator,OS=17.5,name=iPhone 15' \
-sdk iphonesimulator17.5 \
-sdk iphonesimulator18.0 \
| xcbeautify
20 changes: 16 additions & 4 deletions scripts/version-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,26 @@ cocoapod_spec_version=$(grep -Eo '\b[0-9]+\.[0-9]+\.[0-9]+(-[0-9A-Za-z-]+)?(\+[0

echo "Detected Cocoapod Spec Version: ${cocoapod_spec_version}"

# Checks branch name for a v followed by a semantic version MAJOR.MINOR.PATCH string
release_version=$(git branch --show-current | sed -E 's/.*v([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
SEMANTIC_VERSION_FILE=Sources/MuxUploadSDK/PublicAPI/SemanticVersion.swift

echo "Inferred Release Version: ${release_version}"
release_version=$(awk '
/let major/ { gsub(/[^0-9]/, "", $0); major = $0 }
/let minor/ { gsub(/[^0-9]/, "", $0); minor = $0 }
/let patch/ { gsub(/[^0-9]/, "", $0); patch = $0 }
END {
if (major && minor && patch) {
print major "." minor "." patch
} else {
print "Error: Version information not found"
}
}
' <(grep -E 'let major|let minor|let patch' "$SEMANTIC_VERSION_FILE"))

echo "Release version found in ${SEMANTIC_VERSION_FILE}: ${release_version}"

if [ "${cocoapod_spec_version}" == "${release_version}" ]; then
echo "Versions match"
else
echo "Versions do not match, please update ${COCOAPOD_SPEC} to ${release_version}"
echo "Versions do not match, please fix up ${COCOAPOD_SPEC} or ${release_version} to be consistent"
exit 1
fi