Skip to content

Commit

Permalink
Nicer output
Browse files Browse the repository at this point in the history
  • Loading branch information
binkley committed Oct 24, 2023
1 parent 5f8e335 commit 1cdf7ad
Showing 1 changed file with 30 additions and 8 deletions.
38 changes: 30 additions & 8 deletions build-as-ci-does.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,33 @@ if ! command -v earthly >/dev/null; then
exit 2
fi

./batect build-with-gradle && \
./batect -o quiet run-with-gradle &&
earthly +build-with-gradle &&
earthly +run-with-gradle &&
./batect build-with-maven &&
./batect -o quiet run-with-maven &&
earthly +build-with-maven &&
earthly +run-with-maven
set -e

# Provide nicer console output via formatting and color
# See https://github.com/binkley/shell/blob/master/color/color.sh
printf -v preset "\e[0m"
printf -v pbold "\e[1m"

echo "${preset}"
echo "${pbold}BUILD WITH GRADLE UNDER BATECT${preset}"
./batect -o quiet build-with-gradle
echo "${pbold}RUN WITH GRADLE UNDER BATECT${preset}"
./batect -o quiet run-with-gradle

echo
echo "${pbold}BUILD WITH MAVEN UNDER BATECT${preset}"
./batect -o quiet build-with-maven
echo "${pbold}RUN WITH MAVEN UNDER BATECT${preset}"
./batect -o quiet run-with-maven

echo
echo "${pbold}BUILD WITH GRADLE UNDER EARTHLY${preset}"
earthly +build-with-gradle
echo "${pbold}RUN WITH GRADLE UNDER EARTHLY${preset}"
earthly +run-with-gradle

echo
echo "${pbold}BUILD WITH MAVEN UNDER EARTHLY${preset}"
earthly +build-with-maven
echo "${pbold}RUN WITH MAVEN UNDER EARTHLY${preset}"
earthly +run-with-maven

0 comments on commit 1cdf7ad

Please sign in to comment.