代码拉取完成,页面将自动刷新
VERSION=$(shell git describe --abbrev=0 --tags)
BUILD=$(shell git rev-parse --short HEAD)
DATE=$(shell date +%FT%T%z)
# Binaries to be build
PLATFORMS = linux/glauth-ui windows/glauth-ui.exe darwin/glauth-ui-app
BINS = $(wildcard build/*/*)
# functions
temp = $(subst /, ,$@)
os = $(word 1, $(temp))
# Setup the -ldflags option for go building, interpolate the variable values
LDFLAGS=-trimpath -ldflags "-w -s -X 'glauth-ui-light/handlers.Version=${VERSION}, git: ${BUILD}, build: ${DATE}'"
# Build binaries
# first build : linux/glauth-ui
$(PLATFORMS):
@mkdir -p build/${os}
CGO_ENABLED=0 GOOS=${os} go build ${LDFLAGS} -o build/$@
@echo " => bin builded: build/$@"
build: $(PLATFORMS)
# List binaries
$(BINS):
@echo "=============="
@echo "Release text :"
@echo " ${VERSION}, git: ${BUILD}"
@sha256sum $@
sha: $(BINS)
# Cleans our project: deletes binaries
clean:
rm -rf build/
@echo "Build cleaned"
debclean:
@quilt pop
@dh clean
deb:
debuild -us -uc -b
@mkdir -p build/linux/
cp debian/glauth-ui-light/usr/bin/glauth-ui-light build/linux/glauth-ui
@echo "=============="
@echo "Release text :"
@echo " ${VERSION}, git: ${BUILD}"
sha256sum debian/glauth-ui-light/usr/bin/glauth-ui-light
tr:
@echo "shell is $$0"
rgrep -hoP '{{ tr "(.*?)" }}' routes/web/templates/ | sed "s/{{ tr \"//" | sed "s/\" }}/: \"\"/" | sort | uniq > tr.tmp
rgrep -hoP 'Tr\(lang, "(.*?)"' handlers/* | sed "s/Tr(lang, \"//" | sort | uniq | awk -F'"' '{print $$1": \"\""}' >> tr.tmp
cat tr.tmp | sort | uniq > locales/tr.yml
rm tr.tmp
all: build
.PHONY: clean build sha tr $(BINS) $(PLATFORMS)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。