Skip to content

Commit

Permalink
Remove dev suffix from version, add all platforms + archiving to rele…
Browse files Browse the repository at this point in the history
…ase.sh .
  • Loading branch information
DirtyHairy committed Feb 27, 2016
1 parent 7c9229a commit 76505f7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion generators/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

const (
STATIC_VERSION = "0.1.0-dev"
STATIC_VERSION = "0.1.0"
TEMPLATE = `// THIS FILE WAS AUTOGENERATED BY GO GENEREATE. DO NOT EDIT!
package %s
Expand Down
25 changes: 20 additions & 5 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
#!/bin/bash

os_list="linux darwin windows"
os_list="linux darwin windows openbsd freebsd netbsd"

arch_linux="386 amd64"
arch_darwin="386 amd64"
arch_linux="286 amd64 arm"
arch_darwin="386 amd64 arm"
arch_windows="386 amd64"
arch_openbsd="386 amd64 arm"
arch_freebsd="386 amd64 arm"
arch_netbsd="386 amd64 arm"

suffix_windows=".exe"

package_prefix="git.mayflower.de/vaillant-team/docker-ls"
package_prefix="github.com/mayflower/docker-ls"
packages="cli/docker-ls cli/docker-rm"

make install || exit 1
export GOPATH="`pwd`/build"

echo

test -d release && rm -fr release
mkdir release
mkdir release/archives

for os in $os_list; do
arch_list="arch_$os"
suffix="suffix_$os"
Expand All @@ -30,7 +37,15 @@ for os in $os_list; do
for package in $packages; do
full_package="$package_prefix/$package"
binary="$target_dir/${full_package##*/}$suffix"
CGO_ENABLED=0 GOOS="$os" GOARCH="$arch" go build -installsuffix no_cgo -o "$binary" "$full_package" || exit 1
CGO_ENABLED=0 GOOS="$os" GOARM=5 GOARCH="$arch" go build -installsuffix no_cgo -o "$binary" "$full_package" || exit 1
done

echo archiving for $os $arch

zipfile="release/archives/docker-ls-${os}-${arch}.zip"
shafile="$zipfile.sha256"

zip --junk-paths "$zipfile" $target_dir/*
cat "$zipfile" | sha256sum | awk '{print $1;}' > "$shafile"
done
done

0 comments on commit 76505f7

Please sign in to comment.