-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathall-build.sh
39 lines (37 loc) · 924 Bytes
/
all-build.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
38
39
#!/bin/bash -xe
go get github.com/karlmutch/duat/cmd/semver
mkdir -p internal/gen
# Code generation must be done first to allow vendoring and modules to play nice
for dir in cmd/*/ ; do
base="${dir%%\/}"
base="${base##*/}"
if [ "$base" == "cli-experiment" ] ; then
continue
fi
if [ "$base" == "cli-downstream" ] ; then
continue
fi
echo "$base code generator starting"
$dir/build.sh gen
exit_code=$?
if [ $exit_code -ne 0 ]; then
echo "$base code generator failed"
exit $exit_code
fi
done
for dir in cmd/*/ ; do
base="${dir%%\/}"
base="${base##*/}"
if [ "$base" == "cli-experiment" ] ; then
continue
fi
if [ "$base" == "cli-downstream" ] ; then
continue
fi
$dir/build.sh
exit_code=$?
if [ $exit_code -ne 0 ]; then
echo "$base code compilation failed"
exit $exit_code
fi
done