Skip to content

Commit 98fc339

Browse files
temapgithub-actions[bot]
authored andcommitted
Consolidate navcore android release pipeline
Extract shared release utilities into pr_utils.py and introduce two reusable composite actions (setup-android-environment, copybara). Move create_android_docs_pr.py from scripts_shared into the navigation-core-android scripts directory and add android_docs_pr.py and publish_release.py as dedicated release steps. Migrate the mirror workflow from a Docker-hosted Copybara image to the new composite action. Update all workflows and Makefiles to use the new actions and script locations. GitOrigin-RevId: ff85917019c4c4e3d5e418b561ec6dc896ad4fff
1 parent b00447c commit 98fc339

1 file changed

Lines changed: 12 additions & 5 deletions

File tree

Makefile

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ assemble-core-debug:
108108

109109
.PHONY: assemble-core-release
110110
assemble-core-release:
111-
$(call run-gradle-tasks,$(CORE_MODULES),assembleRelease $(additional_gradle_parameters))
111+
$(call run-gradle-tasks,$(CORE_MODULES),assembleRelease $(if $(VERSION_NAME),-PVERSION_NAME=$(VERSION_NAME),) $(additional_gradle_parameters))
112112

113113
.PHONY: core-unit-tests
114114
core-unit-tests:
@@ -170,7 +170,7 @@ assemble-ui-debug:
170170

171171
.PHONY: assemble-ui-release
172172
assemble-ui-release:
173-
$(call run-gradle-tasks,$(UI_MODULES),assembleRelease $(additional_gradle_parameters))
173+
$(call run-gradle-tasks,$(UI_MODULES),assembleRelease $(if $(VERSION_NAME),-PVERSION_NAME=$(VERSION_NAME),) $(additional_gradle_parameters))
174174

175175
.PHONY: ui-unit-tests
176176
ui-unit-tests:
@@ -206,16 +206,23 @@ upload-to-sdk-registry-snapshot:
206206

207207
.PHONY: upload-to-sdk-registry
208208
upload-to-sdk-registry:
209-
./gradlew mapboxSDKRegistryUpload
210-
./gradlew mapboxSDKRegistryUpload -PndkMajor=27
209+
./gradlew mapboxSDKRegistryUpload $(if $(VERSION_NAME),-PVERSION_NAME=$(VERSION_NAME),)
210+
./gradlew mapboxSDKRegistryUpload $(if $(VERSION_NAME),-PVERSION_NAME=$(VERSION_NAME),) -PndkMajor=27
211211

212212
.PHONY: publish-to-sdk-registry
213213
publish-to-sdk-registry:
214214
@if [ -z "$(GITHUB_TOKEN)" ]; then \
215215
echo "GITHUB_TOKEN env variable has to be set"; \
216216
else \
217217
python3 -m pip install git-pull-request; \
218-
./gradlew mapboxSDKRegistryPublishAll; \
218+
output=$$(./gradlew mapboxSDKRegistryPublishAll $(if $(VERSION_NAME),-PVERSION_NAME=$(VERSION_NAME),) --stacktrace --info 2>&1); \
219+
exit_code=$$?; \
220+
echo "$$output"; \
221+
if [ $$exit_code -ne 0 ] && echo "$$output" | grep -q "nothing to commit"; then \
222+
if [ "$$GITHUB_ACTIONS" = "true" ]; then echo "::warning title=SDK Registry Already Published::SDK Registry configs already published — skipping"; else echo "SDK Registry configs already published — skipping"; fi; \
223+
elif [ $$exit_code -ne 0 ]; then \
224+
exit $$exit_code; \
225+
fi; \
219226
fi
220227

221228
.PHONY: ui-check-api

0 commit comments

Comments
 (0)