1 Star 0 Fork 196

louandme/gin-admin

forked from Lyric/gin-admin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
Makefile 1.23 KB
一键复制 编辑 原始数据 按行查看 历史
.PHONY: start build
NOW = $(shell date -u '+%Y%m%d%I%M%S')
RELEASE_VERSION = v10.0.2
APP = ginadmin
SERVER_BIN = ${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)
CONFIG_DIR = ./configs
CONFIG_FILES = dev
STATIC_DIR = ./build/dist
START_ARGS = -d $(CONFIG_DIR) -c $(CONFIG_FILES) -s $(STATIC_DIR)
all: start
start:
@go run -ldflags "-X main.VERSION=$(RELEASE_TAG)" main.go start $(START_ARGS)
build:
@go build -ldflags "-w -s -X main.VERSION=$(RELEASE_TAG)" -o $(SERVER_BIN)
# go install github.com/google/wire/cmd/wire@latest
wire:
@wire gen ./internal/wirex
# go install github.com/swaggo/swag/cmd/swag@latest
swagger:
@swag init --parseDependency --generalInfo ./main.go --output ./internal/swagger
# https://github.com/OpenAPITools/openapi-generator
openapi:
docker run --rm -v ${PWD}:/local openapitools/openapi-generator-cli generate -i /local/internal/swagger/swagger.yaml -g openapi -o /local/internal/swagger/v3
clean:
rm -rf data $(SERVER_BIN)
serve: build
./$(SERVER_BIN) start $(START_ARGS)
serve-d: build
./$(SERVER_BIN) start $(START_ARGS) -d
stop:
./$(SERVER_BIN) stop
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/louandme/gin-admin.git
git@gitee.com:louandme/gin-admin.git
louandme
gin-admin
gin-admin
main

搜索帮助