xref: /aosp_15_r20/external/aws-crt-java/codebuild/cd/deploy-snapshot-android.sh (revision 3c7ae9de214676c52d19f01067dc1a404272dc11)
1*3c7ae9deSAndroid Build Coastguard Worker#!/bin/bash
2*3c7ae9deSAndroid Build Coastguard Worker
3*3c7ae9deSAndroid Build Coastguard Workerset -ex
4*3c7ae9deSAndroid Build Coastguard Workerset -o pipefail # Make sure one process in pipe fail gets bubble up
5*3c7ae9deSAndroid Build Coastguard Worker
6*3c7ae9deSAndroid Build Coastguard Workergit submodule update --init
7*3c7ae9deSAndroid Build Coastguard Workercd ./android
8*3c7ae9deSAndroid Build Coastguard Worker
9*3c7ae9deSAndroid Build Coastguard WorkerGPG_KEY=$(cat /tmp/aws-sdk-common-runtime.key.asc)
10*3c7ae9deSAndroid Build Coastguard Worker# Publish to nexus
11*3c7ae9deSAndroid Build Coastguard Worker../gradlew -PsigningKey=$"$GPG_KEY" -PsigningPassword=$GPG_PASSPHRASE -PsonatypeUsername='aws-sdk-common-runtime' -PsonatypePassword=$ST_PASSWORD publishToAwsNexus closeAwsNexusStagingRepository | tee /tmp/android_deploy.log
12*3c7ae9deSAndroid Build Coastguard Worker# Get the staging repository id and save it
13*3c7ae9deSAndroid Build Coastguard Workercat /tmp/android_deploy.log | grep "Created staging repository" | cut -d\' -f2 | tee /tmp/android_repositoryId.txt
14