mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-09-24 03:42:32 -04:00
Add Windows to Makefile and build_release
Added Windows/386 and Windows/amd64 to the Makefile. Some minor changes needed to be made to build_release to give the windows binary the ".exe" extension.
This commit is contained in:
parent
b5fa56861d
commit
db03222bc5
2
Makefile
2
Makefile
@ -39,3 +39,5 @@ release:
|
||||
GOOS=linux GOARCH=386 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE
|
||||
GOOS=darwin GOARCH=amd64 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE
|
||||
GOOS=freebsd GOARCH=amd64 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE
|
||||
GOOS=windows GOARCH=386 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE
|
||||
GOOS=windows GOARCH=amd64 $(LDFLAGS) ./build_release "github.com/shazow/ssh-chat/cmd/ssh-chat" README.md LICENSE
|
||||
|
@ -37,6 +37,11 @@ build() {
|
||||
local bin="$(basename $package)"
|
||||
local tarball="${bin}-${GOOS}_${GOARCH}.tgz"
|
||||
local outdir="$BUILDDIR/$bin"
|
||||
local tardir="$bin"
|
||||
if [ "$GOOS" == "windows" ]; then
|
||||
bin="$bin.exe"
|
||||
fi
|
||||
|
||||
|
||||
if [[ -d "$outdir" ]]; then
|
||||
echo "err: outdir already exists: $PWD/$outdir"
|
||||
@ -51,7 +56,7 @@ build() {
|
||||
fi
|
||||
|
||||
# Create tarball
|
||||
tar -C "$BUILDDIR" -czvf "$BUILDDIR/$tarball" "$bin"
|
||||
tar -C "$BUILDDIR" -czvf "$BUILDDIR/$tarball" "$tardir"
|
||||
|
||||
# Cleanup
|
||||
rm -rf "$outdir"
|
||||
|
Loading…
x
Reference in New Issue
Block a user