-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Showing
5 changed files
with
89 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
$targets = @( | ||
@{GOOS="darwin"; GOARCH="amd64"; Output="evilpot_darwin_amd64"}, | ||
@{GOOS="darwin"; GOARCH="arm64"; Output="evilpot_darwin_arm64"}, | ||
@{GOOS="linux"; GOARCH="386"; Output="evilpot_linux_386"}, | ||
@{GOOS="linux"; GOARCH="amd64"; Output="evilpot_linux_amd64"}, | ||
@{GOOS="linux"; GOARCH="arm64"; Output="evilpot_linux_arm64"}, | ||
@{GOOS="windows"; GOARCH="amd64"; Output="evilpot_windows_amd64.exe"} | ||
) | ||
|
||
foreach ($target in $targets) { | ||
$env:GOOS = $target.GOOS | ||
$env:GOARCH = $target.GOARCH | ||
$output = $target.Output | ||
|
||
Write-Host "Building for $($env:GOOS)/$($env:GOARCH)..." | ||
go build -o $output . | ||
|
||
if ($LASTEXITCODE -eq 0) { | ||
Write-Host "Successfully built $output" | ||
} else { | ||
Write-Host "Failed to build $output" | ||
} | ||
} | ||
|
||
Remove-Item env:GOOS | ||
Remove-Item env:GOARCH |
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
targets=( | ||
"darwin amd64 evilpot_darwin_amd64" | ||
"darwin arm64 evilpot_darwin_arm64" | ||
"linux 386 evilpot_linux_386" | ||
"linux amd64 evilpot_linux_amd64" | ||
"linux arm64 evilpot_linux_arm64" | ||
"windows amd64 evilpot_windows_amd64.exe" | ||
) | ||
|
||
for target in "${targets[@]}"; do | ||
IFS=' ' read -r -a params <<< "$target" | ||
GOOS=${params[0]} | ||
GOARCH=${params[1]} | ||
OUTPUT=${params[2]} | ||
|
||
echo "Building for $GOOS/$GOARCH..." | ||
GOOS=$GOOS GOARCH=$GOARCH go build -o $OUTPUT | ||
|
||
if [ $? -eq 0 ]; then | ||
echo "Successfully built $OUTPUT" | ||
else | ||
echo "Failed to build $OUTPUT" | ||
fi | ||
done |
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