diff --git a/ci_scripts/ci_post_xcodebuild.sh b/ci_scripts/ci_post_xcodebuild.sh new file mode 100644 index 00000000..bb4378f7 --- /dev/null +++ b/ci_scripts/ci_post_xcodebuild.sh @@ -0,0 +1,74 @@ +#!/bin/sh + +set -e + +required_env_vars=( + "CI_ARCHIVE_PATH" + "CI_BRANCH" + "CI_COMMIT" + "EMERGE_API_KEY" +) + +for var in "${required_env_vars[@]}"; do + if [[ -z "${!var}" ]]; then + echo "Environment variable $var is not set" + exit 1 + fi +done + +brew install jq + +zip_path="$CI_ARCHIVE_PATH.zip" +pushd $(dirname $CI_ARCHIVE_PATH) +zip -r --symlinks "$(basename $zip_path)" "$(basename $CI_ARCHIVE_PATH)" +popd + +# Update this with your repo +repo_name='IceCubesApp' + +tag='release' +if [[ "$CI_XCODE_SCHEME" == "My Debug Archive Scheme" ]]; then + tag='debug' +fi + +json_fields=$(cat <