You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* use go 1.10.x and 1.11.x on travis
* Remove the build hack that uses a local GOPATH:
* Use `go_import_path` on travis and create a symlink to the main org repo on
semaphore
* Users forking stolon repo on github should just use git remotes in the main
repo clone
* Remove messages to build a cgo enabled stdlib, go build cache introduced in go
1.10 also caches this.
* Always use `go build` instead of `go install` so we can directly place
binaries in the project bin dir and choose the binary name
@@ -72,32 +61,12 @@ if [ -w ${go_root_dir}/pkg ]; then
72
61
use_go_install=1
73
62
fi
74
63
75
-
if [ -z$use_go_install ];then
76
-
echo"Cannot find/create a go stdlib created with cgo disabled for the go release installed at ${go_root_dir} since ${go_root_dir}/pkg is not writable by `whoami`"
77
-
echo"The build will use \"go build\" instead of \"go install\". This is slower since every run will need to rebuild all the needed packages."
78
-
echo"To speed up the build you should make ${go_root_dir}/pkg writable for `whoami` for at least the first build"
79
-
echo"or manually rebuild stdlib executing the command 'CGO_ENABLED=0 go install -a -installsuffix cgo std' from a user with write access to ${go_root_dir}/pkg"
80
-
81
-
forcmdin sentinel proxy;do
82
-
CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags "$LD_FLAGS" -o ${BINDIR}/stolon-${cmd}${REPO_PATH}/cmd/${cmd}
83
-
done
84
-
CGO_ENABLED=0 go build -a -installsuffix cgo -ldflags "$LD_FLAGS" -o ${BINDIR}/stolonctl ${REPO_PATH}/cmd/stolonctl
85
-
else
86
-
forcmdin sentinel proxy;do
87
-
CGO_ENABLED=0 go install -installsuffix cgo -ldflags "$LD_FLAGS"${REPO_PATH}/cmd/${cmd}
88
-
rm -f ${BINDIR}/stolon-${cmd}
89
-
cp ${GOPATH}/bin/${cmd}${BINDIR}/stolon-${cmd}
90
-
done
91
-
CGO_ENABLED=0 go install -installsuffix cgo -ldflags "$LD_FLAGS"${REPO_PATH}/cmd/stolonctl
92
-
rm -f ${BINDIR}/stolonctl
93
-
cp ${GOPATH}/bin/stolonctl ${BINDIR}/
94
-
fi
64
+
forcmdin sentinel proxy;do
65
+
CGO_ENABLED=0 go build -installsuffix cgo -ldflags "$LD_FLAGS" -o ${BINDIR}/stolon-${cmd}${REPO_PATH}/cmd/${cmd}
66
+
done
67
+
CGO_ENABLED=0 go build -installsuffix cgo -ldflags "$LD_FLAGS" -o ${BINDIR}/stolonctl ${REPO_PATH}/cmd/stolonctl
95
68
96
-
# stolon-keeper cannot be statically built since it needs to get its current
97
-
# running user and this is not available with cgo disabled
98
-
go install -ldflags "$LD_FLAGS"${REPO_PATH}/cmd/keeper
99
-
rm -f ${BINDIR}/stolon-keeper
100
-
cp ${GOPATH}/bin/keeper ${BINDIR}/stolon-keeper
69
+
go build -ldflags "$LD_FLAGS" -o ${BINDIR}/stolon-keeper ${REPO_PATH}/cmd/keeper
0 commit comments