mirror of
https://github.com/outbackdingo/matchbox.git
synced 2026-01-27 18:19:36 +00:00
There is no reason to force this. Instead have the docker-build command do it before it is built. Also, use the actual package name: bootcfg. It confused me that bootcfg was called server.
13 lines
499 B
Bash
Executable File
13 lines
499 B
Bash
Executable File
#!/bin/bash -e
|
|
|
|
# allow builds outside the standard GOPATH via symlink
|
|
export GOPATH=${PWD}/Godeps/_workspace
|
|
export GOBIN=${PWD}/bin
|
|
|
|
mkdir -p $GOPATH/src/github.com/coreos
|
|
# directory or symlink must be present
|
|
[ -d $GOPATH/src/github.com/coreos/coreos-baremetal ] || ln -s ${PWD} $GOPATH/src/github.com/coreos/coreos-baremetal
|
|
|
|
LD_FLAGS="-w -X main.version=$(./git-version)"
|
|
CGO_ENABLED=0 go build -o bin/bootcfg -ldflags "$LD_FLAGS" -a -tags netgo github.com/coreos/coreos-baremetal/cmd/bootcfg
|