mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
* reduce the time to run yarn build:server from 1.5minutes, to 10 seconds Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io> * add yarn test:server Signed-off-by: Sven Dowideit <sven.dowideit@portainer.io>
14 lines
237 B
Bash
Executable file
14 lines
237 B
Bash
Executable file
set -x
|
|
|
|
mkdir -p dist
|
|
|
|
cd api
|
|
# the go get adds 8 seconds
|
|
go get -t -d -v ./...
|
|
|
|
# the build takes 2 seconds
|
|
GOOS=$1 GOARCH=$2 CGO_ENABLED=0 go build \
|
|
--installsuffix cgo \
|
|
--ldflags '-s' \
|
|
-o "../dist/portainer" \
|
|
./cmd/portainer/
|