Skip to content

Commit 0a1b7cc

Browse files
committed
chore: add a command to build a binary for Linux.
Usage: $ make build-linux $ ./my-country-linux
1 parent 93d5592 commit 0a1b7cc

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
my-country
2+
my-country-linux

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
.PHONY: build fmt clean
1+
.PHONY: build build-linux fmt clean
22

33
build:
44
go build -o my-country .
55

6+
build-linux:
7+
GOOS=linux GOARH=amd64 go build -o my-country-linux .
8+
69
fmt:
710
gofmt -s -d -w .
811

912
clean:
10-
rm my-country
13+
rm my-country my-country-linux

0 commit comments

Comments
 (0)