Skip to content

Instantly share code, notes, and snippets.

@xialeistudio
Created September 18, 2018 06:38
Show Gist options
  • Save xialeistudio/413ed4be20cf686a4de466049006a8eb to your computer and use it in GitHub Desktop.
Save xialeistudio/413ed4be20cf686a4de466049006a8eb to your computer and use it in GitHub Desktop.
```
.PHONY: build clean lint help
all: build deploy
build:
GOOS=linux GOARCH=amd64 go build -v -o ./bin/phonebook-backend-d .
upx ./bin/phonebook-backend-d
deploy:
git commit -am "release"
git push
lint:
golint ./...
clean:
rm -rf ./bin/phonebook-backend-d
go clean -i .
help:
@echo "make: 编译程序"
@echo "make lint: 检查代码风格"
@echo "make clean: 清空二进制文件及缓存文件"
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment