-
Notifications
You must be signed in to change notification settings - Fork 21
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
2bad801
commit 8b71d95
Showing
4 changed files
with
55 additions
and
8 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
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,10 +1,43 @@ | ||
#!/bin/sh | ||
|
||
FREEBSD="freebsd" | ||
LINUX="linux" | ||
DARWIN="darwin" | ||
WINDOWS="windows" | ||
|
||
VERSION="0.1" | ||
ARCHS="darwin linux freebsd windows" | ||
ARCHS="${DARWIN} ${LINUX} ${FREEBSD} ${WINDOWS}" | ||
|
||
if [ $1 == "release" ]; then | ||
echo "Generating simple-httpd release binaries..." | ||
for arch in ${ARCHS}; do | ||
GOOS=${arch} GOARCH=amd64 go build -v -ldflags "-X main.gitSHA=$(git rev-parse HEAD)" -o bin/simple-httpd-${arch} | ||
done | ||
fi | ||
|
||
echo "Generating simple-httpd release binaries..." | ||
case "$1" in | ||
"release") | ||
echo "Building release..." | ||
for arch in ${ARCHS}; do | ||
GOOS=${arch} GOARCH=amd64 go build -v -ldflags "-X main.gitSHA=$(git rev-parse HEAD)" -o bin/simple-httpd-${arch} | ||
done | ||
;; | ||
"freebsd") | ||
echo "Building binary for FreeBSD" | ||
GOOS=${FREEBSD} GOARCH=amd64 go build -v -ldflags "-X main.gitSHA=$(git rev-parse HEAD)" -o bin/simple-httpd-${FREEBSD} | ||
;; | ||
"darwin") | ||
echo "Building binary for Darwin" | ||
GOOS=${DARWIN} GOARCH=amd64 go build -v -ldflags "-X main.gitSHA=$(git rev-parse HEAD)" -o bin/simple-httpd-${DARWIN} | ||
;; | ||
"linux") | ||
echo "Building binary for Linux" | ||
GOOS=${LINUX} GOARCH=amd64 go build -v -ldflags "-X main.gitSHA=$(git rev-parse HEAD)" -o bin/simple-httpd-${LINUX} | ||
;; | ||
"windows") | ||
echo "Building binary for Windows" | ||
GOOS=${WINDOWS} GOARCH=amd64 go build -v -ldflags "-X main.gitSHA=$(git rev-parse HEAD)" -o bin/simple-httpd-${WINDOWS} | ||
;; | ||
esac | ||
|
||
for arch in ${ARCHS}; do | ||
GOOS=windows GOARCH=amd64 go build -v -ldflags "-X main.gitSHA=$(git rev-parse HEAD)" -o bin/simple-httpd-${arch} | ||
done | ||
exit 0 |
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
Binary file not shown.