Skip to content

Commit cdffe3e

Browse files
committed
add build script
1 parent c2573b6 commit cdffe3e

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@
2222

2323
# executable
2424
/abc
25+
/build

build.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/sh
2+
# https://golang.org/doc/install/source#environment
3+
4+
VERSION=0.1.0
5+
6+
export GOARCH=amd64
7+
8+
export GOOS=darwin
9+
10+
go build -o "build/abc-${GOOS}-${VERSION}" -tags '!oss' ./cmd/abc/...
11+
12+
export GOOS=windows
13+
14+
go build -o "build/abc-${GOOS}-${VERSION}.exe" -tags '!oss' ./cmd/abc/...
15+
16+
export GOOS=linux
17+
18+
go build -o "build/abc-${GOOS}-${VERSION}" -tags '!oss' ./cmd/abc/...

0 commit comments

Comments
 (0)