Simplifying linkage monitor test setup (#6855)

This commit is contained in:
Tomo Suzuki 2019-12-04 12:49:51 -05:00 committed by Rafi Kamal
parent ef210164aa
commit 6396a47d5d

View File

@ -251,16 +251,6 @@ build_java_linkage_monitor() {
# Linkage Monitor uses $HOME/.m2 local repository
MVN="mvn -e -B -Dhttps.protocols=TLSv1.2"
cd java
# Sets java artifact version with SNAPSHOT, as Linkage Monitor looks for SNAPSHOT versions.
# Example: "3.9.0" (without 'rc')
VERSION=`grep '<version>' pom.xml |head -1 |perl -nle 'print $1 if m/<version>(\d+\.\d+.\d+)/'`
cd bom
# This local installation avoids the problem caused by a new version not yet in Maven Central
# https://github.com/protocolbuffers/protobuf/issues/6627
$MVN install
$MVN versions:set -DnewVersion=${VERSION}-SNAPSHOT
cd ..
$MVN versions:set -DnewVersion=${VERSION}-SNAPSHOT
# Installs the snapshot version locally
$MVN install -Dmaven.test.skip=true