Skip to content

Commit

Permalink
chore: [java] synthtool not to create an initial gitignore. (#1672) (#…
Browse files Browse the repository at this point in the history
…1021)

* chore: [java] synthtool not to create an initial gitignore.

Given that new generated libraries will come to the Java monorepo
going forward and that any new hand-written libraries can get
a new .gitignore from humans, there's no need to automatically
prepare .gitignore file.

* deleting gitignore

* deleting .gitignore from golden
Source-Link: googleapis/synthtool@0baf7e4
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:25a679b48797fcdd98fe339c885d9595a8be5c16a275d1b466ba98e6951a3217

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Nov 2, 2022
1 parent 1b98ca9 commit 62e1504
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 53 deletions.
3 changes: 1 addition & 2 deletions java-errorreporting/.github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest
digest: sha256:264c6d5da60ff1684fbdd2b268d6a3ffca2038246e0948a06f15ca0c3cf28ce8

digest: sha256:25a679b48797fcdd98fe339c885d9595a8be5c16a275d1b466ba98e6951a3217
51 changes: 0 additions & 51 deletions java-errorreporting/.kokoro/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,54 +57,3 @@ retry_with_backoff 3 10 \
-Dclirr.skip=true

mvn -B dependency:analyze -DfailOnWarning=true

echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************"
## Run dependency list completeness check
function completenessCheck() {
# Output dep list with compile scope generated using the original pom
# Running mvn dependency:list on Java versions that support modules will also include the module of the dependency.
# 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/ --.*//' >.org-list.txt

# Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes)
msg "Generating dependency list using flattened pom..."
mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt

# Compare two dependency lists
msg "Comparing dependency lists..."
diff .org-list.txt .new-list.txt >.diff.txt
if [[ $? == 0 ]]
then
msg "Success. No diff!"
else
msg "Diff found. See below: "
msg "You can also check .diff.txt file located in $1."
cat .diff.txt
return 1
fi
}

# Allow failures to continue running the script
set +e

error_count=0
for path in **/.flattened-pom.xml
do
# Check flattened pom in each dir that contains it for completeness
dir=$(dirname "$path")
pushd "$dir"
completenessCheck "$dir"
error_count=$(($error_count + $?))
popd
done

if [[ $error_count == 0 ]]
then
msg "All checks passed."
exit 0
else
msg "Errors found. See log statements above."
exit 1
fi

0 comments on commit 62e1504

Please sign in to comment.