1 Star 0 Fork 199

xujiang/gin-admin

forked from Lyric/gin-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Makefile 1.05 KB
一键复制 编辑 原始数据 按行查看 历史
netpro 提交于 2022-03-15 10:52 . Update Makefile
.PHONY: start build
NOW = $(shell date -u '+%Y%m%d%I%M%S')
RELEASE_VERSION = v8.1.0
APP = gin-admin
SERVER_BIN = ./cmd/${APP}/${APP}
RELEASE_ROOT = release
RELEASE_SERVER = release/${APP}
GIT_COUNT = $(shell git rev-list --all --count)
GIT_HASH = $(shell git rev-parse --short HEAD)
RELEASE_TAG = $(RELEASE_VERSION).$(GIT_COUNT).$(GIT_HASH)
all: start
build:
@go build -ldflags "-w -s -X main.VERSION=$(RELEASE_TAG)" -o $(SERVER_BIN) ./cmd/${APP}
start:
@go run -ldflags "-X main.VERSION=$(RELEASE_TAG)" ./cmd/${APP}/main.go web -c ./configs/config.toml -m ./configs/model.conf --menu ./configs/menu.yaml
swagger:
@swag init --parseDependency --generalInfo ./cmd/${APP}/main.go --output ./internal/app/swagger
wire:
@wire gen ./internal/app
test:
cd ./internal/app/test && go test -v
clean:
rm -rf data release $(SERVER_BIN) internal/app/test/data cmd/${APP}/data
pack: build
rm -rf $(RELEASE_ROOT) && mkdir -p $(RELEASE_SERVER)
cp -r $(SERVER_BIN) configs $(RELEASE_SERVER)
cd $(RELEASE_ROOT) && tar -cvf $(APP).tar ${APP} && rm -rf ${APP}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/wastill/gin-admin.git
git@gitee.com:wastill/gin-admin.git
wastill
gin-admin
gin-admin
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385