-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
2 changed files
with
49 additions
and
0 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 |
---|---|---|
@@ -1,6 +1,9 @@ | ||
# Generic | ||
.DS_Store | ||
|
||
# Bin | ||
/bin/ | ||
|
||
# Logs | ||
*.log | ||
/logs/ | ||
|
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,46 @@ | ||
##----------------------------------------------------------------------------## | ||
## Variables ## | ||
##----------------------------------------------------------------------------## | ||
|
||
OUTPUT = ./bin/ | ||
BINARY = systags | ||
|
||
##----------------------------------------------------------------------------## | ||
## Help ## | ||
##----------------------------------------------------------------------------## | ||
|
||
.PHONY: help | ||
|
||
help: | ||
@echo | ||
@echo "WELCOME TO SYSTAGS" | ||
@echo "------------------" | ||
@echo | ||
@echo "MAKE" | ||
@echo " $$ make help - Prints out these help instructions" | ||
@echo " $$ make build - Builds systags binary for this OS" | ||
@echo " $$ make clean - Cleans and removes generated files" | ||
@echo " $$ make publish - Builds artifacts for a new release" | ||
@echo | ||
@echo "DOCS" | ||
@echo " Visit https://github.com/StackAdapt/systags for more" | ||
@echo | ||
|
||
##----------------------------------------------------------------------------## | ||
## Build ## | ||
##----------------------------------------------------------------------------## | ||
|
||
.PHONY: build clean publish | ||
|
||
build: | ||
go build -o "$(OUTPUT)$(BINARY)" | ||
|
||
clean: | ||
rm -rf "$(OUTPUT)" | ||
|
||
publish: clean | ||
env GOOS=linux GOARCH=amd64 go build -o "$(OUTPUT)$(BINARY)_linux_amd64/$(BINARY)" | ||
env GOOS=linux GOARCH=arm64 go build -o "$(OUTPUT)$(BINARY)_linux_arm64/$(BINARY)" | ||
|
||
tar -czf "$(OUTPUT)$(BINARY)_linux_amd64.tar.gz" -C "$(OUTPUT)" "$(BINARY)_linux_amd64" | ||
tar -czf "$(OUTPUT)$(BINARY)_linux_arm64.tar.gz" -C "$(OUTPUT)" "$(BINARY)_linux_arm64" |