Tweaked makefile: added publish recipe
This commit is contained in:
parent
fae249faae
commit
d61fd52d65
|
@ -3,16 +3,15 @@
|
|||
# GOARCH=amd64 GOOS=windows go build -o ${BINNAME}-linux-${VERSION}.exe -ldflags "-X main.appname=${BINNAME} -X main.version=${VERSION}" *.go
|
||||
# rm ${BINNAME}-linux-${VERSION}.exe
|
||||
# ################################################################################
|
||||
APPNAME := patreon-ui
|
||||
BINNAME := io.cdmnky.net.patreon-ui
|
||||
APPNAME := patreon-dl
|
||||
BINNAME := io.cdmnky.net.${APPNAME}-gui
|
||||
VERSION := $(shell cat VERSION)
|
||||
BUILD := $(shell date +"%Y.%m.%d")
|
||||
LINKNAME := ${HOME}/.bin/patreon-ui/patreon-ui
|
||||
LINKNAME := ${HOME}/.bin/${APPNAME}/${APPNAME}-gui
|
||||
PUBDIR := ${HOME}/Public/io.cdmnky/v1/media/${APPNAME}
|
||||
|
||||
build:
|
||||
./local.bin/io.cdmnky.dev.mkassets -d webassets/ -o ./src/assets.go
|
||||
GOARCH=amd64 GOOS=linux go build -o ./bin/${BINNAME}-linux-${VERSION}.bin -ldflags "-X main.appname=${APPNAME} -X main.version=${VERSION} -X main.build=${BUILD}" ./src/*.go
|
||||
./local.bin/io.cdmnky.dev.mkassets -d /dev/null -o ./src/assets.go
|
||||
|
||||
run:
|
||||
GOARCH=amd64 GOOS=linux go build -o ./bin/${BINNAME} ./src/*.go
|
||||
|
@ -22,8 +21,15 @@ install:
|
|||
ifneq ("$(wildcard $(LINKNAME))","")
|
||||
rm ${LINKNAME}
|
||||
endif
|
||||
cp ./bin/${BINNAME}-linux-${VERSION}.bin ${HOME}/.bin/patreon-ui/
|
||||
ln -s ${HOME}/.bin/patreon-ui/${BINNAME}-linux-${VERSION}.bin ${LINKNAME}
|
||||
mkdir -p ${HOME}/.bin/${APPNAME}/
|
||||
cp ./bin/${BINNAME}-linux-${VERSION}.bin ${HOME}/.bin/${APPNAME}/
|
||||
ln -s ${HOME}/.bin/${APPNAME}/${BINNAME}-linux-${VERSION}.bin ${LINKNAME}
|
||||
|
||||
publish:
|
||||
ifneq ("$(wildcard ./bin/${BINNAME}-linux-${VERSION}.bin)","")
|
||||
mkdir -p ${PUBDIR}
|
||||
tar -cf ${PUBDIR}/${BINNAME}-linux-${VERSION}.tar -C ./bin/ ${BINNAME}-linux-${VERSION}.bin config.json
|
||||
endif
|
||||
|
||||
clean:
|
||||
go clean
|
||||
|
|
Loading…
Reference in New Issue