blob: 324c08525e762e323ed8311631503e9f40db16e6 [file] [log] [blame]
Dustin Lamd7916df2020-08-11 11:06:07 -07001#! /bin/bash
2
3set -x
4
Aurimas Liutikas6a3f9772021-08-06 15:06:23 -07005METALAVA_VERSION="$1"
6METALAVA_BUILD_ID="$2"
Dustin Lamd7916df2020-08-11 11:06:07 -07007SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
8
Aurimas Liutikas6a3f9772021-08-06 15:06:23 -07009if [ -z "$METALAVA_VERSION" ]; then
10 echo "You must specify a build id for Metalava: ./updateMetalava.sh <metalava_version> <build_id>"
Dustin Lamd7916df2020-08-11 11:06:07 -070011 exit 1
12fi
13
Aurimas Liutikas6a3f9772021-08-06 15:06:23 -070014python "$SCRIPT_PATH"/importMaven/import_maven_artifacts.py -n com.android.tools.metalava:metalava:"$METALAVA_VERSION" -mb "$METALAVA_BUILD_ID"
Dustin Lamd7916df2020-08-11 11:06:07 -070015sed -i "s/\(androidx\.playground\.metalavaBuildId=\)[0-9]*/\1$METALAVA_BUILD_ID/g" "$SCRIPT_PATH"/../playground-common/playground.properties
16