File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed
Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ dist /
Original file line number Diff line number Diff line change 1+ CMD_PATH := cmd/git-remote-https+iap
2+ CMD_NAME := git-remote-https+iap
3+
4+ BIN_PATH := dist/bin/
5+
6+ version := $(shell git describe --match "v* .* " --abbrev=7 --tags --dirty)
7+ build_args := -ldflags "-X main.version=${version}"
8+
9+ .PHONY : all
10+ all : build
11+
12+ $(BIN_PATH ) :
13+ mkdir -p $@
14+
15+ build : $(BIN_PATH )
16+ env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build ${build_args} -o $(BIN_PATH ) ${CMD_NAME} -darwin-amd64 ${CMD_PATH} /* .go
17+ env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build ${build_args} -o $(BIN_PATH ) ${CMD_NAME} -linux-amd64 ${CMD_PATH} /* .go
18+
19+ .PHONY : version
20+ version :
21+ @echo " $( version) "
22+
23+ .PHONY : clean
24+ clean :
25+ rm -rf $(BIN_PATH )
You can’t perform that action at this time.
0 commit comments