Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Dec 3, 2023. It is now read-only.
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore: formating
  • Loading branch information
Neenu1995 committed Jan 20, 2022
commit 911bee628ff3a78e7ef77e3a60448cb10544b0dc
12 changes: 4 additions & 8 deletions .kokoro/downstream-client-library-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ set -eo pipefail
# Display commands being run.
set -x


CORE_LIBRARY_ARTIFACT=$1
CLIENT_LIBRARY=$2
## Get the directory of the build script
Expand All @@ -28,10 +27,8 @@ cd ${scriptDir}/..
# Make java core library artifacts available for 'mvn validate' at the bottom
mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider adding -ntp -fae


# Read the current version of this java core library in the POM. Example version: '0.116.1-alpha-SNAPSHOT'
CORE_VERSION_POM=pom.xml
# Namespace (xmlns) prevents xmllint from specifying tag names in XPath
CORE_VERSION=`sed -e 's/xmlns=".*"//' ${CORE_VERSION_POM} | xmllint --xpath '/project/version/text()' -`
CORE_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -`

if [ -z "${CORE_VERSION}" ]; then
echo "Version is not found in ${CORE_VERSION_POM}"
Expand All @@ -46,7 +43,7 @@ git clone "https://github.com/googleapis/java-shared-dependencies.git" --depth=1
pushd java-shared-dependencies/first-party-dependencies

# replace version
xmllint --shell <(cat pom.xml) << EOF
xmllint --shell pom.xml << EOF
setns x=http://maven.apache.org/POM/4.0.0
cd .//x:artifactId[text()="${CORE_LIBRARY_ARTIFACT}"]
cd ../x:version
Expand All @@ -58,9 +55,8 @@ EOF
cd ..
mvn -Denforcer.skip=true clean install
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider adding -ntp -fae


SHARED_DEPS_VERSION_POM=pom.xml
# Namespace (xmlns) prevents xmllint from specifying tag names in XPath
SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' ${SHARED_DEPS_VERSION_POM} | xmllint --xpath '/project/version/text()' -`
SHARED_DEPS_VERSION=`sed -e 's/xmlns=".*"//' pom.xml | xmllint --xpath '/project/version/text()' -`

if [ -z "${SHARED_DEPS_VERSION}" ]; then
echo "Version is not found in ${SHARED_DEPS_VERSION_POM}"
Expand All @@ -78,7 +74,7 @@ if [[ $CLIENT_LIBRARY == "bigtable" ]]; then
fi

# replace version
xmllint --shell <(cat pom.xml) << EOF
xmllint --shell pom.xml << EOF
setns x=http://maven.apache.org/POM/4.0.0
cd .//x:artifactId[text()="google-cloud-shared-dependencies"]
cd ../x:version
Expand Down