Skip to content

Commit

Permalink
add build target
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Reisinger committed Oct 28, 2021
1 parent f2b85d2 commit 69bd910
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ cmd/checkip-darwin-amd64*
cmd/checkip-linux-amd64*
cmd/checkip-linux-arm*
cmd/checkip-windows-amd64*
cmd/checkip
/x
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ test:
install: test
go install cmd/checkip.go

run: test
checkip 140.82.114.4 | sort
checkip 218.92.0.158 | sort
checkip 92.118.160.17 | sort
build: test
go build -ldflags "-w" -o cmd/checkip cmd/checkip.go

run: build
./cmd/checkip 140.82.114.4
./cmd/checkip 218.92.0.158
./cmd/checkip 92.118.160.17

PLATFORMS := linux/amd64 darwin/amd64 linux/arm windows/amd64

Expand Down

0 comments on commit 69bd910

Please sign in to comment.