This repository was archived by the owner on Aug 23, 2023. It is now read-only.
File tree 5 files changed +20
-48
lines changed
5 files changed +20
-48
lines changed Original file line number Diff line number Diff line change 7
7
steps :
8
8
- checkout
9
9
- run : scripts/build.sh
10
- - run : scripts/build_tools.sh
11
10
- setup_remote_docker
12
11
- run : scripts/build_docker.sh
13
12
- run : mkdir build_docker
Original file line number Diff line number Diff line change 7
7
$(MAKE ) test
8
8
bin :
9
9
./scripts/build.sh
10
- ./scripts/build_tools.sh
11
10
bin-race :
12
11
./scripts/build.sh -race
13
- ./scripts/build_tools.sh -race
14
12
docker :
15
13
./scripts/build_docker.sh
16
14
all :
File renamed without changes.
Original file line number Diff line number Diff line change 2
2
3
3
set -e
4
4
5
-
6
5
# Find the directory we exist within
7
6
DIR=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd )
8
7
cd ${DIR} /..
@@ -24,13 +23,23 @@ rm -rf $BUILDDIR/*
24
23
# disable cgo
25
24
export CGO_ENABLED=0
26
25
27
- OUTPUT=$BUILDDIR /metrictank
28
-
29
- if [ " $1 " == " -race" ]
30
- then
31
- set -x
32
- go build -race -ldflags " -X main.gitHash=$GITVERSION " -o $OUTPUT
33
- else
34
- set -x
35
- go build -ldflags " -X main.gitHash=$GITVERSION " -o $OUTPUT
36
- fi
26
+ function fail () {
27
+ echo " Aborting due to failure." >&2
28
+ exit 2
29
+ }
30
+
31
+ # Build binary
32
+ cd cmd
33
+ for bin in * ; do
34
+ cd $bin
35
+ if [ " $1 " == " -race" ]
36
+ then
37
+ set -x
38
+ CGO_ENABLED=1 go build -race -ldflags " -X main.gitHash=$GITVERSION " -o $BUILDDIR /$bin || fail
39
+ else
40
+ set -x
41
+ go build -ldflags " -X main.gitHash=$GITVERSION " -o $BUILDDIR /$bin || fail
42
+ fi
43
+ set +x
44
+ cd ..
45
+ done
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments