1 Star 6 Fork 0

leo/calender_puzzle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
makefile 1018 Bytes
一键复制 编辑 原始数据 按行查看 历史
.PHONY: build container build-local build-linux build-windows
# Project output directory.
OUTPUT_DIR := ./bin
# Build directory.
BUILD_DIR := ./build
NAME := puzzle
IMAGE_NAME := puzzle
CUR_PWD := $(shell pwd)
AUTHOR := $(shell git log --pretty=format:"%an"|head -n 1)
VERSION := $(shell git rev-list HEAD | head -1)
BUILD_DATE := $(shell date +%Y%m%d%H%M%S)
# Track code version with Docker Label.
DOCKER_LABELS ?= git-describe="$(shell date -u +v%Y%m%d)-$(shell git describe --tags --always --dirty)"
export GO111MODULE=on
build: build-local build-linux build-windows
build-local:
go build -v -o $(OUTPUT_DIR)/$(NAME)-mac
build-linux:
GOOS=linux go build -v -o $(OUTPUT_DIR)/$(NAME)-linux
build-windows:
GOOS=windows go build -v -o $(OUTPUT_DIR)/$(NAME)-win.exe
container:
@docker build -t $(IMAGE_NAME):$(VERSION)-$(AUTHOR)-$(BUILD_DATE) \
--label $(DOCKER_LABELS) \
-f $(BUILD_DIR)/Dockerfile .;
clean:
rm -rf $(OUTPUT_DIR)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/leono1/calender_puzzle.git
git@gitee.com:leono1/calender_puzzle.git
leono1
calender_puzzle
calender_puzzle
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385