refactor(mk): move build rules into separate scripts (#855)
See https://github.com/ooni/probe/issues/2218
This commit is contained in:
Executable
+19
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
EXPECTED_XCODE_VERSION=${EXPECTED_XCODE_VERSION:-13.4.1}
|
||||
|
||||
printf "checking for xcodebuild... "
|
||||
command -v xcodebuild || {
|
||||
echo "not found"
|
||||
exit 1
|
||||
}
|
||||
|
||||
printf "checking for Xcode version... "
|
||||
__XCODEVERSION_REAL=$(xcodebuild -version | grep ^Xcode | awk '{print $2}')
|
||||
echo $__XCODEVERSION_REAL
|
||||
[[ "$EXPECTED_XCODE_VERSION" = "$__XCODEVERSION_REAL" ]] || {
|
||||
echo "fatal: Xcode version must be $EXPECTED_XCODE_VERSION instead of $__XCODEVERSION_REAL"
|
||||
exit 1
|
||||
}
|
||||
Executable
+6
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
__version=$(date -u +%Y.%m.%d-%H%M%S)
|
||||
__release=$(git describe --tags || echo '0.0.0-dev')
|
||||
cat ./MOBILE/ios/template.podspec | sed -e "s/@VERSION@/$__version/g" \
|
||||
-e "s/@RELEASE@/$__release/g" >./MOBILE/ios/oonimkall.podspec
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
set -euxo pipefail
|
||||
(
|
||||
cd ./MOBILE/ios
|
||||
rm -rf oonimkall.xcframework.zip
|
||||
zip -yr oonimkall.xcframework.zip oonimkall.xcframework
|
||||
)
|
||||
Reference in New Issue
Block a user