Files
whisper-com/kokoro/linux/java_linkage_monitor/build.sh
Henry Winkel 36bca61764 Squashed 'libs/protobuf/' content from commit fcd3b9a85
git-subtree-dir: libs/protobuf
git-subtree-split: fcd3b9a85ef36e46643dc30176cea1a7ad62e02b
2022-10-22 14:46:58 +02:00

28 lines
862 B
Bash
Executable File

#!/bin/bash
#
# This is the top-level script we give to Kokoro as the entry point for
# running the "pull request" project:
#
# This script selects a specific Dockerfile (for building a Docker image) and
# a script to run inside that image.
use_bazel.sh 4.2.2
# Change to repo root
cd $(dirname $0)/../../..
bazel build //:protoc
# The java build setup expects protoc in the root directory.
cp bazel-bin/protoc .
cd java
# Installs the snapshot version locally
mvn -e -B -Dhttps.protocols=TLSv1.2 install -Dmaven.test.skip=true
# Linkage Monitor uses the snapshot versions installed in $HOME/.m2 to verify compatibility
JAR=linkage-monitor-latest-all-deps.jar
curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}"
# Fails if there's new linkage errors compared with baseline
java -jar $JAR com.google.cloud:libraries-bom