Skip to content

Commit b7ff8ee

Browse files
committed
ref(Makefile): compress with upx directly
The `goupx` tool isn't needed since go 1.6.
1 parent 6441ece commit b7ff8ee

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ DEV_ENV_CMD := ${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE}
1616
# doesn't allow +, so we use -.
1717
BINARY_DEST_DIR := rootfs/usr/bin
1818
# Common flags passed into Go's linker.
19-
LDFLAGS := "-s -X main.version=${VERSION}"
19+
LDFLAGS := "-s -w -X main.version=${VERSION}"
2020
# Docker Root FS
2121
BINDIR := ./rootfs
2222

@@ -35,9 +35,9 @@ glideup:
3535
# the Docker environment. Other alternatives are cross-compiling, doing
3636
# the build as a `docker build`.
3737
build:
38-
${DEV_ENV_PREFIX} -e CGO_ENABLED=0 ${DEV_ENV_IMAGE} go build -a -installsuffix cgo -ldflags ${LDFLAGS} -o ${BINARY_DEST_DIR}/boot boot.go || exit 1
38+
${DEV_ENV_PREFIX} -e CGO_ENABLED=0 ${DEV_ENV_IMAGE} go build -a -installsuffix cgo -ldflags ${LDFLAGS} -o ${BINARY_DEST_DIR}/boot boot.go
3939
@$(call check-static-binary,$(BINARY_DEST_DIR)/boot)
40-
${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE} goupx ${BINARY_DEST_DIR}/boot || exit 1
40+
${DEV_ENV_PREFIX} ${DEV_ENV_IMAGE} upx -9 ${BINARY_DEST_DIR}/boot
4141

4242
test:
4343
${DEV_ENV_CMD} sh -c 'go test $$(glide nv)'

0 commit comments

Comments
 (0)