Add script to fetch OpenJDK 21 prebuilts am: f849b278a3
Original change: https://android-review.googlesource.com/c/platform/prebuilts/jdk/jdk21/+/2850965 Change-Id: Ie60c9d45580d79acce7ae636262a731270eff0d7 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -10,8 +10,6 @@
|
|||||||
|
|
||||||
BUILD_NUMBER="${1:?Specify build number}"
|
BUILD_NUMBER="${1:?Specify build number}"
|
||||||
LINUX_ZIP=/tmp/$$.linux.zip
|
LINUX_ZIP=/tmp/$$.linux.zip
|
||||||
DARWIN_ZIP=/tmp/$$.darwin.zip
|
|
||||||
DARWIN_ARM64_ZIP=/tmp/$$.darwin_arm64.zip
|
|
||||||
|
|
||||||
FETCH_ARTIFACT=/google/data/ro/projects/android/fetch_artifact
|
FETCH_ARTIFACT=/google/data/ro/projects/android/fetch_artifact
|
||||||
cd "$(dirname $0)"
|
cd "$(dirname $0)"
|
||||||
@@ -20,8 +18,6 @@ rm -rf staging
|
|||||||
mkdir -p staging
|
mkdir -p staging
|
||||||
|
|
||||||
$FETCH_ARTIFACT --bid ${BUILD_NUMBER} --disable_progressbar --target linux_openjdk21 jdk.zip ${LINUX_ZIP}
|
$FETCH_ARTIFACT --bid ${BUILD_NUMBER} --disable_progressbar --target linux_openjdk21 jdk.zip ${LINUX_ZIP}
|
||||||
$FETCH_ARTIFACT --bid ${BUILD_NUMBER} --disable_progressbar --target darwin_mac_openjdk21 jdk.zip ${DARWIN_ZIP}
|
|
||||||
$FETCH_ARTIFACT --bid ${BUILD_NUMBER} --disable_progressbar --target darwin_aarch64_jetbrainsruntime21 jdk.zip ${DARWIN_ARM64_ZIP}
|
|
||||||
$FETCH_ARTIFACT --bid ${BUILD_NUMBER} --disable_progressbar --target linux_openjdk21 manifest_${BUILD_NUMBER}.xml staging/manifest.xml
|
$FETCH_ARTIFACT --bid ${BUILD_NUMBER} --disable_progressbar --target linux_openjdk21 manifest_${BUILD_NUMBER}.xml staging/manifest.xml
|
||||||
|
|
||||||
rm -rf staging/linux-x86
|
rm -rf staging/linux-x86
|
||||||
@@ -29,18 +25,7 @@ mkdir -p staging/linux-x86
|
|||||||
(cd staging/linux-x86; unzip -q ${LINUX_ZIP})
|
(cd staging/linux-x86; unzip -q ${LINUX_ZIP})
|
||||||
touch staging/linux-x86/MODULE_LICENSE_GPL
|
touch staging/linux-x86/MODULE_LICENSE_GPL
|
||||||
|
|
||||||
rm -rf staging/darwin-x86
|
rm -f ${LINUX_ZIP}
|
||||||
mkdir staging/darwin-x86
|
|
||||||
(cd staging/darwin-x86; unzip -q ${DARWIN_ZIP})
|
|
||||||
touch staging/darwin-x86/MODULE_LICENSE_GPL
|
|
||||||
|
|
||||||
rm -rf staging/darwin-arm64
|
|
||||||
mkdir staging/darwin-arm64
|
|
||||||
(cd staging/darwin-arm64; unzip -q ${DARWIN_ARM64_ZIP})
|
|
||||||
(cp -r staging/darwin-arm64/Contents/Home/* staging/darwin-arm64; rm -rf staging/darwin-arm64/jdk-21.0.2.jdk)
|
|
||||||
touch staging/darwin-x86/MODULE_LICENSE_GPL
|
|
||||||
|
|
||||||
rm -f ${LINUX_ZIP} ${DARWIN_ZIP} ${DARWIN_ARM64_ZIP}
|
|
||||||
|
|
||||||
# Copy the RBE toolchain inputs files from the previous version to the staging
|
# Copy the RBE toolchain inputs files from the previous version to the staging
|
||||||
# directory.
|
# directory.
|
||||||
@@ -48,8 +33,8 @@ cp linux-x86/bin/*_remote_toolchain_inputs staging/linux-x86/bin
|
|||||||
|
|
||||||
version=$(staging/linux-x86/bin/java -version 2>&1 | grep "OpenJDK Runtime Environment" | sed -e 's/.*(\(.*\))/\1/')
|
version=$(staging/linux-x86/bin/java -version 2>&1 | grep "OpenJDK Runtime Environment" | sed -e 's/.*(\(.*\))/\1/')
|
||||||
|
|
||||||
rm -rf linux-x86 darwin-x86 darwin-arm64 manifest.xml
|
rm -rf linux-x86 manifest.xml
|
||||||
mv staging/* .
|
mv staging/* .
|
||||||
rmdir staging
|
rmdir staging
|
||||||
git add linux-x86 darwin-x86 darwin-arm64 manifest.xml
|
git add linux-x86 manifest.xml
|
||||||
git commit -m "Update to JDK $version" --edit
|
git commit -m "Update to JDK $version" --edit
|
||||||
|
|||||||
Reference in New Issue
Block a user