代码拉取完成,页面将自动刷新
.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)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。