代码拉取完成,页面将自动刷新
同步操作将从 iwannay/jiacrontab 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Go parameters
goCmd=go
goBuild=$(goCmd) build
goClean=$(goCmd) clean
goTest=$(goCmd) test
goGet=$(goCmd) get
sourceAdmDir=./app/jiacrontab_admin
sourceNodeDir=./app/jiacrontabd
binAdm=$(sourceAdmDir)/jiacrontab_admin
binNode=$(sourceNodeDir)/jiacrontabd
buildDir=./build
buildAdmDir=$(buildDir)/jiacrontab/jiacrontab_admin
buildNodeDir=$(buildDir)/jiacrontab/jiacrontabd
admCfg=$(sourceAdmDir)/jiacrontab_admin.ini
nodeCfg=$(sourceNodeDir)/jiacrontabd.ini
staticDir=./jiacrontab_admin/static/build
staticSourceDir=./jiacrontab_admin/static
workDir=$(shell pwd)
.PHONY: all build test clean build-linux build-windows
all: test build
build:
$(call checkStatic)
$(call init)
$(goBuild) -o $(binAdm) -v $(sourceAdmDir)
$(goBuild) -o $(binNode) -v $(sourceNodeDir)
mv $(binAdm) $(buildAdmDir)
mv $(binNode) $(buildNodeDir)
build2:
$(call init)
$(goBuild) -o $(binAdm) -v $(sourceAdmDir)
$(goBuild) -o $(binNode) -v $(sourceNodeDir)
mv $(binAdm) $(buildAdmDir)
mv $(binNode) $(buildNodeDir)
test:
$(goTest) -v -race -coverprofile=coverage.txt -covermode=atomic $(sourceAdmDir)
$(goTest) -v -race -coverprofile=coverage.txt -covermode=atomic $(sourceNodeDir)
clean:
rm -f $(binAdm)
rm -f $(binNode)
rm -rf $(buildDir)
# Cross compilation
build-linux:
$(call checkStatic)
$(call init)
GOOS=linux GOARCH=amd64 $(goBuild) -o $(binAdm) -v $(sourceAdmDir)
GOOS=linux GOARCH=amd64 $(goBuild) -o $(binNode) -v $(sourceNodeDir)
mv $(binAdm) $(buildAdmDir)
mv $(binNode) $(buildNodeDir)
build-windows:
$(call checkStatic)
$(call init)
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC="x86_64-w64-mingw32-gcc -fno-stack-protector -D_FORTIFY_SOURCE=0 -lssp" $(goBuild) -o $(binAdm).exe -v $(sourceAdmDir)
CGO_ENABLED=1 GOOS=windows GOARCH=amd64 CC="x86_64-w64-mingw32-gcc -fno-stack-protector -D_FORTIFY_SOURCE=0 -lssp" $(goBuild) -o $(binNode).exe -v $(sourceNodeDir)
mv $(binAdm).exe $(buildAdmDir)
mv $(binNode).exe $(buildNodeDir)
define checkStatic
@if [ "$(assets)" = "" ]; then echo "no assets, see https://github.com/jiacrontab/jiacrontab-frontend"; exit -1;else echo "build release"; fi
go-bindata -pkg admin -prefix $(assets) -o jiacrontab_admin/bindata_gzip.go -fs $(assets)/...
endef
define init
rm -rf $(buildDir)
mkdir $(buildDir)
mkdir -p $(buildAdmDir)
mkdir -p $(buildNodeDir)
cp $(admCfg) $(buildAdmDir)
cp $(nodeCfg) $(buildNodeDir)
endef
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。