Score
0
Watch 1 Star 6 Fork 0

iWuxc / go-apiserverGoAFL-3.0

Join us
Explore and code with more than 2 million developers,Free private repositories !:)
Sign up
一个简单的go apiserver小框架 spread retract

Clone or download
Makefile 1.20 KB
Copy Edit Web IDE Raw Blame History
iWuxc authored 2019-12-22 19:54 . first commit
SHELL := /bin/bash
BASEDIR = $(shell pwd)
# build with verison infos
versionDir = "apiserver/pkg/version"
gitTag = $(shell if [ "`git describe --tags --abbrev=0 2>/dev/null`" != "" ];then git describe --tags --abbrev=0; else git log --pretty=format:'%h' -n 1; fi)
buildDate = $(shell TZ=Asia/Shanghai date +%FT%T%z)
gitCommit = $(shell git log --pretty=format:'%H' -n 1)
gitTreeState = $(shell if git status|grep -q 'clean';then echo clean; else echo dirty; fi)
ldflags="-w -X ${versionDir}.gitTag=${gitTag} -X ${versionDir}.buildDate=${buildDate} -X ${versionDir}.gitCommit=${gitCommit} -X ${versionDir}.gitTreeState=${gitTreeState}"
all: gotool
@go build -v -ldflags ${ldflags} .
clean:
rm -f apiserver
find . -name "[._]*.s[a-w][a-z]" | xargs -i rm -f {}
gotool:
gofmt -w .
go vet . | grep -v vendor;true
ca:
openssl req -new -nodes -x509 -out conf/server.crt -keyout conf/server.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=127.0.0.1/emailAddress=xxxxx@qq.com"
help:
@echo "make - compile the source code"
@echo "make clean - remove binary file and vim swp files"
@echo "make gotool - run go tool 'fmt' and 'vet'"
@echo "make ca - generate ca files"
.PHONY: clean gotool ca help

Comment ( 0 )

Sign in for post a comment

Go
1
https://gitee.com/iWuxc/go-apiserver.git
git@gitee.com:iWuxc/go-apiserver.git
iWuxc
go-apiserver
go-apiserver
master

Help Search