| readonly SDK_VERSION='1.11.297' |
| readonly MVN_REPO='repo1.maven.org/maven2' |
| local src_jar="$artifact-$SDK_VERSION-sources.jar" |
| wget "https://$MVN_REPO/com/amazonaws/$artifact/$SDK_VERSION/$src_jar" |
| core_jar="$(fetch_artifact 'aws-java-sdk-core')" |
| s3_jar="$(fetch_artifact 'aws-java-sdk-s3')" |
| # Unpack the core source first |
| unzip "$core_jar" -x 'META-INF/*' -d "$out_dir" |
| # Grab Region from the S3 jar |
| unzip "$s3_jar" 'com/amazonaws/services/s3/model/Region.java' -d "$out_dir" |
| echo "Applying (or attempting to apply) bazel patches against AWS SDK" |
| done < <(find patches-vs-$SDK_VERSION -name '*.patch') |
| fetch_and_unpack ./src/main/java |