-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrelease.sh
More file actions
executable file
·91 lines (78 loc) · 1.79 KB
/
release.sh
File metadata and controls
executable file
·91 lines (78 loc) · 1.79 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# $GOOS $GOARCH
# android arm
# darwin 386
# darwin amd64
# darwin arm
# darwin arm64
# dragonfly amd64
# freebsd 386
# freebsd amd64
# freebsd arm
# linux 386
# linux amd64
# linux arm
# linux arm64
# linux ppc64
# linux ppc64le
# linux mips64
# linux mips64le
# netbsd 386
# netbsd amd64
# netbsd arm
# openbsd 386
# openbsd amd64
# openbsd arm
# plan9 386
# plan9 amd64
# solaris amd64
# windows 386
# windows amd64
# env GOOS=linux GOARCH=arm go build -v .
# env GOOS=darwin GOARCH=amd64 go build -v .
# https://github.com/aktau/github-release
#
# expects GITHUB_TOKEN in env
#
github-release info -u lytics -r lytics
# TAG=$(git describe $(git rev-list --tags --max-count=1))
TAG="latest"
echo "releasing $TAG"
# if we are re-running, lets delete it first
github-release delete --user lytics --repo lytics --tag $TAG
# create a formal release
github-release release \
--user lytics \
--repo lytics \
--tag $TAG \
--name "Lytics CLI Latest" \
--description "
Scripts to download and save the binary and rename to lytics
\`\`\`
# linux/amd64
curl -Lo lytics https://github.com/lytics/lytics/releases/download/latest/lytics_linux \\
&& chmod +x lytics \\
&& sudo mv lytics /usr/local/bin/
# OS X/amd64
curl -Lo lytics https://github.com/lytics/lytics/releases/download/latest/lytics_mac \\
&& chmod +x lytics \\
&& sudo mv lytics /usr/local/bin/
\`\`\`
"
# upload a file, the mac osx amd64 binary
echo "Creating and uploading mac client"
env GOOS=darwin GOARCH=amd64 go build
github-release upload \
--user lytics \
--repo lytics \
--tag $TAG \
--name "lytics_mac" \
--file lytics
# now linux
go build
echo "Creating and uploading linux client"
github-release upload \
--user lytics \
--repo lytics \
--tag $TAG \
--name "lytics_linux" \
--file lytics