xref: /aosp_15_r20/external/conscrypt/release/docker (revision cd0cc2e34ba52cdf454361820a14d744e4bd531d)
1*cd0cc2e3SAndroid Build Coastguard Worker#!/bin/sh
2*cd0cc2e3SAndroid Build Coastguard Worker#
3*cd0cc2e3SAndroid Build Coastguard Worker# Release automation script for running within the Docker container.
4*cd0cc2e3SAndroid Build Coastguard Worker# This script is invoked from the Linux script.
5*cd0cc2e3SAndroid Build Coastguard Worker#
6*cd0cc2e3SAndroid Build Coastguard Worker# Because this is run in the Docker container, we can use absolute
7*cd0cc2e3SAndroid Build Coastguard Worker# paths to everything and generally count on everything being where we
8*cd0cc2e3SAndroid Build Coastguard Worker# expect it to be.
9*cd0cc2e3SAndroid Build Coastguard Worker
10*cd0cc2e3SAndroid Build Coastguard Workerset -e
11*cd0cc2e3SAndroid Build Coastguard Worker
12*cd0cc2e3SAndroid Build Coastguard Workerif [ -z "$1" ]; then
13*cd0cc2e3SAndroid Build Coastguard Worker  echo "Usage: $0 <version>"
14*cd0cc2e3SAndroid Build Coastguard Worker  exit 1
15*cd0cc2e3SAndroid Build Coastguard Workerfi
16*cd0cc2e3SAndroid Build Coastguard Worker
17*cd0cc2e3SAndroid Build Coastguard Workercd /conscrypt
18*cd0cc2e3SAndroid Build Coastguard Worker
19*cd0cc2e3SAndroid Build Coastguard WorkerBRANCH=$(echo "$1" | sed -E 's/([0-9]+[.][0-9]+[.])[0-9]+/\1x/')
20*cd0cc2e3SAndroid Build Coastguard Workergit checkout "$BRANCH"
21*cd0cc2e3SAndroid Build Coastguard Worker
22*cd0cc2e3SAndroid Build Coastguard Worker# Update the gradle.properties file for the location of files in the
23*cd0cc2e3SAndroid Build Coastguard Worker# container.
24*cd0cc2e3SAndroid Build Coastguard Worker
25*cd0cc2e3SAndroid Build Coastguard Worker# The host copy may have the signingKeystore and
26*cd0cc2e3SAndroid Build Coastguard Worker# signingPassword properties commented out because signing isn't
27*cd0cc2e3SAndroid Build Coastguard Worker# routinely done for development builds, so ensure they're
28*cd0cc2e3SAndroid Build Coastguard Worker# uncommented.
29*cd0cc2e3SAndroid Build Coastguard Workersed -i 's/#signingKeystore/signingKeystore/' /root/.gradle/gradle.properties
30*cd0cc2e3SAndroid Build Coastguard Workersed -i 's/#signingPassword/signingPassword/' /root/.gradle/gradle.properties
31*cd0cc2e3SAndroid Build Coastguard Workersed -i 's\signing.secretKeyRingFile=.*\signing.secretKeyRingFile=/root/.gnupg/secring.gpg\' /root/.gradle/gradle.properties
32*cd0cc2e3SAndroid Build Coastguard Workersed -i 's\signingKeystore=.*\signingKeystore=/root/certkeystore\' /root/.gradle/gradle.properties
33*cd0cc2e3SAndroid Build Coastguard Worker
34*cd0cc2e3SAndroid Build Coastguard Worker./gradlew conscrypt-openjdk:build
35*cd0cc2e3SAndroid Build Coastguard Worker./gradlew -Dorg.gradle.parallel=false publish
36*cd0cc2e3SAndroid Build Coastguard Worker
37*cd0cc2e3SAndroid Build Coastguard Workercd /usr/src/boringssl
38*cd0cc2e3SAndroid Build Coastguard Worker
39*cd0cc2e3SAndroid Build Coastguard Workerecho "***************************************************************"
40*cd0cc2e3SAndroid Build Coastguard Workerecho "** BoringSSL revision: $(git rev-parse HEAD)"
41*cd0cc2e3SAndroid Build Coastguard Workerecho "***************************************************************"
42