Skip to content

Commit 2aaae83

Browse files
persidskiygithub-actions[bot]
authored andcommitted
Maps iOS in CD pipeline
GitOrigin-RevId: 2ec8210b616b58716f23ed128ba9af0e5c56df8e
1 parent aed2ce9 commit 2aaae83

File tree

5 files changed

+23
-4
lines changed

5 files changed

+23
-4
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ MapboxMaps.xcodeproj
1616
Sources/MapboxMaps/Documentation.docc/*.html
1717

1818
.vscode
19+
MapboxMaps.doccarchive.zip
20+
MapboxMaps.doccarchive

Sources/MapboxMaps/MapboxMaps.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version" : "11.11.0"
2+
"version": "11.11.0-SNAPSHOT-03-04--04-28.git-2ee907d"
33
}

scripts/doc-generation/build-docc.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ set -euo pipefail
44
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
55
public_repo_root="$script_dir/../../"
66

7-
# Usage: build-docc.sh <hosting_base_path> <output_path>
7+
# Usage: build-docc.sh <hosting_base_path> <output_path> <use_project>
88

99
hosting_base_path=${1:-"/ios/maps/api/latest/"}
1010
docc_archive=${2:-"$(pwd)/MapboxMaps.doccarchive"}
11+
use_project=${3:-""}
1112
theme_dir="$script_dir/docc-theme"
1213
docc_sources_path="$public_repo_root/Sources/MapboxMaps/Documentation.docc"
1314

@@ -23,8 +24,15 @@ process_template() {
2324

2425
build_doc() {
2526
pushd "$public_repo_root/"
26-
xcodegen
27-
xcodebuild -project MapboxMaps.xcodeproj docbuild -config Release -scheme MapboxMaps -destination "generic/platform=iOS" \
27+
if [[ -n $use_project ]]; then
28+
PROJECT=$use_project
29+
echo "Using project $PROJECT"
30+
else
31+
PROJECT="MapboxMaps.xcodeproj"
32+
xcodegen
33+
fi
34+
35+
xcodebuild -project $PROJECT docbuild -config Release -scheme MapboxMaps -destination "generic/platform=iOS" \
2836
COMPILER_INDEX_STORE_ENABLE=NO OTHER_DOCC_FLAGS_UNIFIED="--experimental-enable-custom-templates --output-path $docc_archive --hosting-base-path $hosting_base_path"
2937
popd
3038
}

scripts/prepare_binary_dependencies.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/usr/bin/env bash
2+
SKIP_BINARY_DEPS=${SKIP_BINARY_DEPS:-0}
23

4+
if [[ "$SKIP_BINARY_DEPS" -eq 1 ]]; then
5+
echo "SKIP_BINARY_DEPS is set to 1. Skipping binary dependencies download. Do not forget to put the right version to the Carthage/Build folder."
6+
exit 0
7+
fi
38
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"
49

510
cd "$SCRIPT_DIR/../" || exit

scripts/release/upload-to-registry.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,7 @@ DOWNLOAD_URL=https://api.mapbox.com/downloads/v2/${PROJECT}/${UPLOAD_TYPE}/ios/$
2727
step "Uploading ${SOURCE_ZIP} to ${S3_DESTINATION}"
2828
aws s3 cp ${SOURCE_ZIP} ${S3_DESTINATION} ${S3_ARGS:-}
2929
step "Download URL will be ${DOWNLOAD_URL}"
30+
31+
if [[ -n "${GITHUB_STEP_SUMMARY:-}" ]]; then
32+
echo "${ZIP_FILENAME}: \`${DOWNLOAD_URL}\`" >> $GITHUB_STEP_SUMMARY
33+
fi

0 commit comments

Comments
 (0)