-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b4febd
commit b617352
Showing
7 changed files
with
48 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,7 @@ factom-cli | |
_obj | ||
_test | ||
bin | ||
build | ||
pkg | ||
.idea | ||
vendor/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
REVISION = $(shell git describe --tags) | ||
$(info Make factom-cli $(REVISION)) | ||
|
||
LDFLAGS := "-s -w -X main.FactomcliVersion=$(REVISION)" | ||
|
||
default: factom-cli | ||
install: factom-cli-install | ||
all: factom-cli-darwin-amd64 factom-cli-windows-amd64.exe factom-cli-windows-386.exe factom-cli-linux-amd64 factom-cli-linux-arm64 factom-cli-linux-arm7 | ||
|
||
BUILD_FOLDER := build | ||
|
||
factom-cli: | ||
go build -trimpath -ldflags $(LDFLAGS) | ||
factom-cli-install: | ||
go install -trimpath -ldflags $(LDFLAGS) | ||
|
||
factom-cli-darwin-amd64: | ||
env GOOS=darwin GOARCH=amd64 go build -trimpath -ldflags $(LDFLAGS) -o $(BUILD_FOLDER)/factom-cli-darwin-amd64-$(REVISION) | ||
factom-cli-windows-amd64.exe: | ||
env GOOS=windows GOARCH=amd64 go build -trimpath -ldflags $(LDFLAGS) -o $(BUILD_FOLDER)/factom-cli-windows-amd64-$(REVISION).exe | ||
factom-cli-windows-386.exe: | ||
env GOOS=windows GOARCH=386 go build -trimpath -ldflags $(LDFLAGS) -o $(BUILD_FOLDER)/factom-cli-windows-386-$(REVISION).exe | ||
factom-cli-linux-amd64: | ||
env GOOS=linux GOARCH=amd64 go build -trimpath -ldflags $(LDFLAGS) -o $(BUILD_FOLDER)/factom-cli-linux-amd64-$(REVISION) | ||
factom-cli-linux-arm64: | ||
env GOOS=linux GOARCH=arm64 go build -trimpath -ldflags $(LDFLAGS) -o $(BUILD_FOLDER)/factom-cli-linux-arm64-$(REVISION) | ||
factom-cli-linux-arm7: | ||
env GOOS=linux GOARCH=arm GOARM=7 go build -trimpath -ldflags $(LDFLAGS) -o $(BUILD_FOLDER)/factom-cli-linux-arm7-$(REVISION) | ||
|
||
.PHONY: clean | ||
|
||
clean: | ||
rm -f factom-cli | ||
rm -rf build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters