mirror of
https://github.com/anomalyco/hex.git
synced 2026-11-21 17:56:51 +08:00
Ryan wants the repo and TestFlight to stay on 0.2.0 while the App Store gets 0.2.1. ci_post_clone.sh now rewrites MARKETING_VERSION from a tag ios-beta-appstore-<version> before xcodegen; other builds are untouched. Verified sh -n and the sed against a copy of project.yml (all three targets become 0.2.1).
30 lines
1.1 KiB
Bash
Executable File
30 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
set -eu
|
|
|
|
# The Xcode project is generated; the full dependency graph is checked in.
|
|
if [ -n "${CI_PRIMARY_REPOSITORY_PATH:-}" ]; then
|
|
cd "$CI_PRIMARY_REPOSITORY_PATH/ios"
|
|
else
|
|
cd "$(dirname "$0")/.."
|
|
fi
|
|
command -v xcodegen >/dev/null || brew install xcodegen
|
|
# An App Store build is tagged ios-beta-appstore-<version> (e.g. ios-beta-appstore-0.2.1):
|
|
# it is stamped with that version, while the repo and TestFlight stay on project.yml's.
|
|
case "${CI_TAG:-}" in
|
|
ios-beta-appstore-*)
|
|
version="${CI_TAG#ios-beta-appstore-}"
|
|
case "$version" in
|
|
*[!0-9.]* | "" | .* | *.) echo "Bad App Store version in tag: $CI_TAG" >&2; exit 1 ;;
|
|
esac
|
|
sed -i '' -E "s/^( +MARKETING_VERSION: ).*/\1$version/" project.yml
|
|
grep -n 'MARKETING_VERSION' project.yml
|
|
;;
|
|
esac
|
|
scripts/fetch-cleanup-model.sh
|
|
xcodegen generate
|
|
pins=HEXMobile.xcodeproj/project.xcworkspace/xcshareddata/swiftpm
|
|
mkdir -p "$pins"
|
|
cp Package.resolved "$pins/Package.resolved"
|
|
xcodebuild -resolvePackageDependencies -project HEXMobile.xcodeproj -scheme HEXMobile \
|
|
-disableAutomaticPackageResolution -onlyUsePackageVersionsFromResolvedFile
|