fabric-samples/ci/scripts/lint-java.sh
jkneubuh 0ce94bbb9b
Move lint and test-network-basic tests from Azure to GHA - READY FOR MERGE (#862)
* Move Test Network Basic tests from Azure to GHA

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* Move linters from Azure to GHA

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

* Apply review comments - pin java, node, and go runtimes

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>

Signed-off-by: Josh Kneubuhl <jkneubuh@us.ibm.com>
2022-11-14 13:36:55 +00:00

24 lines
No EOL
402 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
function print() {
GREEN='\033[0;32m'
NC='\033[0m'
echo
echo -e "${GREEN}${1}${NC}"
}
dirs=("$(find . -name "*-java" -type d -not -path '*/.*')")
for dir in $dirs; do
print "Linting $dir"
pushd $dir
if [[ -f "pom.xml" ]]; then
print "Running Maven Build"
mvn clean package
else
print "Running Gradle Build"
./gradlew build
fi
popd
done