blob: 9ae87c146224cc41694e651103248161754e2fac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/sh
VERSION=0.1.1
mkdir -p dist
TARGETS="
darwin-amd64
freebsd-386
freebsd-amd64
freebsd-arm
linux-386
linux-amd64
linux-arm
linux-arm64
linux-ppc64
openbsd-386
openbsd-amd64
openbsd-arm
"
# Remove empty lines and indentation
TARGETS=$(echo "$TARGETS" | sed -e '/^$/d' -e 's/ //')
for target in $TARGETS; do
os=$(echo "$target" | cut -d'-' -f 1 -)
arch=$(echo "$target" | cut -d'-' -f 2 -)
GOOS="$os" \
GOARCH="$arch" \
go build -v
tar cjvf "timetasker_${VERSION}_${os}_${arch}.tar.bz2" \
timetasker \
timetasker.bash-completion
mv "timetasker_${VERSION}_${os}_${arch}.tar.bz2" dist
done
|