Skip to content

Commit

Permalink
fix: Update dependencies.sh to not break on mac (#212)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/89127878-1378-496d-ab98-6628bdab65aa/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)

Source-Link: googleapis/synthtool@09c59c2
Source-Link: googleapis/synthtool@87254ac
Source-Link: googleapis/synthtool@1c0c698
Source-Link: googleapis/synthtool@8f76a88

fix: Add shopt -s nullglob to dependencies script
  • Loading branch information
yoshi-automation committed Jul 14, 2021
1 parent 2075564 commit f7e3707
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
1 change: 0 additions & 1 deletion .kokoro/coerce_logs.sh
Expand Up @@ -28,7 +28,6 @@ job=$(basename ${KOKORO_JOB_NAME})
echo "coercing sponge logs..."
for xml in `find . -name *-sponge_log.xml`
do
echo "processing ${xml}"
class=$(basename ${xml} | cut -d- -f2)
dir=$(dirname ${xml})/${job}/${class}
text=$(dirname ${xml})/${class}-sponge_log.txt
Expand Down
5 changes: 3 additions & 2 deletions .kokoro/dependencies.sh
Expand Up @@ -14,6 +14,7 @@
# limitations under the License.

set -eo pipefail
shopt -s nullglob

## Get the directory of the build script
scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}"))
Expand Down Expand Up @@ -46,7 +47,7 @@ function completenessCheck() {
# This is stripped from the output as it is not present in the flattened pom.
# Only dependencies with 'compile' or 'runtime' scope are included from original dependency list.
msg "Generating dependency list using original pom..."
mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// >.org-list.txt
mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e 's/ --.*//' >.org-list.txt

# Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes)
msg "Generating dependency list using flattened pom..."
Expand All @@ -70,7 +71,7 @@ function completenessCheck() {
set +e

error_count=0
for path in $(find -name ".flattened-pom.xml")
for path in **/.flattened-pom.xml
do
# Check flattened pom in each dir that contains it for completeness
dir=$(dirname "$path")
Expand Down
2 changes: 1 addition & 1 deletion java.header
@@ -1,5 +1,5 @@
^/\*$
^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)( All [rR]ights [rR]eserved\.)?$
^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)$
^ \*$
^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$
^ \* you may not use this file except in compliance with the License\.$
Expand Down
5 changes: 3 additions & 2 deletions synth.metadata
Expand Up @@ -4,14 +4,14 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-pubsublite-spark.git",
"sha": "39050962843db79ccdd1ab8f298eaa01288464bd"
"sha": "2075564d73d5284453bbabd730477c096b498a89"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "7332178a11ddddc91188dc0f25bca1ccadcaa6c6"
"sha": "09c59c20a4bf0daed1665af59035ff240fe356df"
}
}
],
Expand Down Expand Up @@ -79,6 +79,7 @@
"CODE_OF_CONDUCT.md",
"CONTRIBUTING.md",
"LICENSE",
"SECURITY.md",
"codecov.yaml",
"java.header",
"license-checks.xml",
Expand Down

0 comments on commit f7e3707

Please sign in to comment.