mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-22 10:31:35 +00:00
Clean up go-compile
- remove unused `--docker` option - neater output for stages of check, build Signed-off-by: Justin Cormack <justin.cormack@docker.com>
This commit is contained in:
parent
30b0d4d6b5
commit
6a315fab59
@ -8,7 +8,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: -o file [--docker]"
|
echo "Usage: -o file"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,8 +30,6 @@ do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
[ $# -gt 0 ] && [ $1 = "--docker" ] && DOCKER=1 && shift
|
|
||||||
|
|
||||||
[ $# -gt 0 ] && usage
|
[ $# -gt 0 ] && usage
|
||||||
[ -z "$out" ] && usage
|
[ -z "$out" ] && usage
|
||||||
|
|
||||||
@ -46,14 +44,9 @@ tar xf - -C $dir
|
|||||||
|
|
||||||
/usr/bin/lint.sh $dir
|
/usr/bin/lint.sh $dir
|
||||||
|
|
||||||
|
>&2 echo "go build..."
|
||||||
|
|
||||||
go build -o $out --ldflags '-extldflags "-fno-PIC -static"' "$package"
|
go build -o $out --ldflags '-extldflags "-fno-PIC -static"' "$package"
|
||||||
|
|
||||||
if [ -z "$DOCKER" ]
|
tar cf - $out
|
||||||
then
|
exit 0
|
||||||
tar cf - $out
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
printf "FROM scratch\nCOPY $out $out\nENTRYPOINT [\"$out\"]\n" > Dockerfile
|
|
||||||
|
|
||||||
tar cf - Dockerfile $out
|
|
||||||
|
@ -12,5 +12,3 @@ test -z $(go tool vet -printf=false . 2>&1 | grep -v */vendor/ | tee /dev/stderr
|
|||||||
|
|
||||||
>&2 echo "golint..."
|
>&2 echo "golint..."
|
||||||
test -z $(find . -type f -name "*.go" -not -path "*/vendor/*" -not -name "*.pb.*" -exec golint {} \; | tee /dev/stderr)
|
test -z $(find . -type f -name "*.go" -not -path "*/vendor/*" -not -name "*.pb.*" -exec golint {} \; | tee /dev/stderr)
|
||||||
|
|
||||||
>&2 echo "Successful lint check!"
|
|
@ -1,5 +1,5 @@
|
|||||||
# Tag: 9c777a22fd84f08e1ea342c0b4ebabfb09fca086
|
# Tag: 6075d4b9c5fe30e19581f1b7ef1813f3041cca32
|
||||||
GO_COMPILE=mobylinux/go-compile@sha256:5e7f1909b0316261653d84f73aeb9188ef20d06b1ecf92eaa4402b32221adfba
|
GO_COMPILE=mobylinux/go-compile@sha256:badfd8a1730ab6e640682d0f95a8f9c51f3cd4b2e8db261fe1a1fd8c6f60bd6e
|
||||||
|
|
||||||
default: usr/bin/diagnostics-server
|
default: usr/bin/diagnostics-server
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Tag: 9c777a22fd84f08e1ea342c0b4ebabfb09fca086
|
# Tag: 6075d4b9c5fe30e19581f1b7ef1813f3041cca32
|
||||||
GO_COMPILE=mobylinux/go-compile@sha256:5e7f1909b0316261653d84f73aeb9188ef20d06b1ecf92eaa4402b32221adfba
|
GO_COMPILE=mobylinux/go-compile@sha256:badfd8a1730ab6e640682d0f95a8f9c51f3cd4b2e8db261fe1a1fd8c6f60bd6e
|
||||||
|
|
||||||
all: usr/bin/slirp-proxy sbin/proxy-vsockd
|
all: usr/bin/slirp-proxy sbin/proxy-vsockd
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# Tag: 9c777a22fd84f08e1ea342c0b4ebabfb09fca086
|
# Tag: 6075d4b9c5fe30e19581f1b7ef1813f3041cca32
|
||||||
GO_COMPILE=mobylinux/go-compile@sha256:5e7f1909b0316261653d84f73aeb9188ef20d06b1ecf92eaa4402b32221adfba
|
GO_COMPILE=mobylinux/go-compile@sha256:badfd8a1730ab6e640682d0f95a8f9c51f3cd4b2e8db261fe1a1fd8c6f60bd6e
|
||||||
|
|
||||||
default: sbin/vsudd
|
default: sbin/vsudd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user