Fix building on macOS #1
9
Makefile
9
Makefile
@ -6,6 +6,11 @@ STATIC_OUT := ${OUT}-${VERSION}
|
||||
PACKAGE_PATH := dist/${OUT}-${VERSION}
|
||||
BUILDOPTS :=
|
||||
|
||||
SHA256_CMD = sha256sum
|
||||
ifeq (, $(shell which $(SHA256_CMD)))
|
||||
SHA256_CMD = shasum -a 256
|
||||
endif
|
||||
|
||||
server:
|
||||
go build -v -o ${OUT} -ldflags="-X main.applicationVersion=${VERSION}" ${BUILDOPTS} ${PKG}
|
||||
|
||||
@ -84,12 +89,12 @@ _prepare_package:
|
||||
rm -rf ${PACKAGE_PATH}
|
||||
mkdir -p ${PACKAGE_PATH}
|
||||
rsync ui json_schemas ${PACKAGE_PATH}/ -a --delete-after
|
||||
cp -ua README.md LICENSE.txt ${PACKAGE_PATH}/
|
||||
rsync -ua README.md LICENSE.txt ${PACKAGE_PATH}/
|
||||
|
||||
_finish_package:
|
||||
rm -r ${PACKAGE_PATH}
|
||||
rm -f ${PACKAGE_PATH}.sha256
|
||||
sha256sum ${PACKAGE_PATH}* | tee ${PACKAGE_PATH}.sha256
|
||||
$(SHA256_CMD) ${PACKAGE_PATH}* | tee ${PACKAGE_PATH}.sha256
|
||||
|
||||
_package_tar: static
|
||||
tar -C $(dir ${PACKAGE_PATH}) -zcf $(PWD)/${PACKAGE_PATH}-${GOOS}.tar.gz $(notdir ${PACKAGE_PATH})
|
||||
|
Loading…
Reference in New Issue
Block a user