forked from binkley/modern-java-practices
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-as-ci-does.sh
executable file
·37 lines (30 loc) · 1020 Bytes
/
build-as-ci-does.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#/usr/bin/env bash
if ! command -v earthly >/dev/null; then
echo "$0: No Earthly found in PATH"
exit 2
fi
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