Skip to content

Commit

Permalink
Refactored release script to abs
Browse files Browse the repository at this point in the history
  • Loading branch information
odino committed Dec 23, 2018
1 parent 2b1a72c commit 9ee6b59
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 66 deletions.
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -12,8 +12,8 @@ repl:
go run main.go
build_simple:
go build -o builds/abs main.go
release:
./scripts/release.sh
release: build_simple
./builds/abs ./scripts/release.abs
install:
go get github.com/c-bata/go-prompt
go get -v github.com/mattn/go-colorable
Expand Down
64 changes: 64 additions & 0 deletions scripts/release.abs
@@ -0,0 +1,64 @@
# Platforms commented out seem
# to be a PITA to compile without
# too much tooling, we'll have a
# look at those later on.
#
# "linux/mips"
#"linux/mipsle"
# "linux/mips64"
# "linux/mips64le"
# "darwin/arm"
# "plan9/386"
# "plan9/amd64"
# "openbsd/386"
# "openbsd/amd64"
# "openbsd/arm"
# "dragonfly/amd64"
# "android/arm"
# "solaris/amd64"
platforms = [
"linux/386",
"linux/amd64",
"linux/arm",
"linux/arm64",
"linux/ppc64",
"linux/ppc64le",
"linux/arm",
"linux/arm64",
"windows/amd64",
"windows/386",
"darwin/amd64",
"darwin/386",
"freebsd/386",
"freebsd/amd64",
"freebsd/arm",
"netbsd/386",
"netbsd/amd64",
"netbsd/arm"
]

echo("Deleting previous builds...")
rm = $(rm -rf builds/abs-*)

if !rm.ok() {
return echo("error: " + rm)
}

for platform in platforms {
parts = platform.split("/")
goos = parts[0]
goarch = parts[1]
output_name = "abs-preview-0-" + goos + "-" + goarch

if (goos == "windows") {
output_name = output_name + ".exe"
}

echo("Building %s %s", goos, goarch)
build = $(GOOS=$goos GOARCH=$goarch go build -o builds/$output_name main.go)

if !build.ok() {
echo("error: " + build)
exit(1)
}
}
64 changes: 0 additions & 64 deletions scripts/release.sh

This file was deleted.

0 comments on commit 9ee6b59

Please sign in to comment.