This repository was archived by the owner on Aug 23, 2023. It is now read-only.
File tree 7 files changed +25
-53
lines changed
7 files changed +25
-53
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
37
36
- run : scripts/qa/go-generate.sh
38
37
- run : scripts/qa/ineffassign.sh
39
38
- run : scripts/qa/misspell.sh
40
- - run : scripts/qa/tools_gitignore .sh
39
+ - run : scripts/qa/gitignore .sh
41
40
- run : scripts/qa/unused.sh
42
41
- run : scripts/qa/vendor.sh
43
42
Original file line number Diff line number Diff line change 1
1
. * .sw ?
2
2
.notouch
3
3
build /
4
- /metrictank
4
+ /cmd / metrictank / metrictank
5
5
/cmd /mt-aggs-explain /mt-aggs-explain
6
6
/cmd /mt-explain /mt-explain
7
7
/cmd /mt-index-cat /mt-index-cat
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.
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ file=../.gitignore
7
7
# NOTE: known limitation: does not clean up stale gitignore rules
8
8
9
9
declare -a missing
10
- for tool in * ; do
11
- rule=" /cmd/$tool / $tool "
10
+ for bin in * ; do
11
+ rule=" /cmd/$bin / $bin "
12
12
grep -q " ^$rule $" $file || missing=(" ${missing[@]} " " $rule " )
13
13
done
14
14
@@ -20,4 +20,4 @@ if [ ${#missing[@]} -gt 0 ]; then
20
20
exit 2
21
21
fi
22
22
23
- echo " gitignore rules for all tools found"
23
+ echo " gitignore rules for all binaries found"
You can’t perform that action at this time.
0 commit comments