| author | |
| committer | |
| log | a1b3e7f6b86413e303b69de73944c3a989c55040 |
| tree | 06f8e3e5efa38a06c2d3b9f9e88683d2e01e0901 |
| parent | d0d7d4d85a13abb195bde71c210285e7541aa62c |
4 files changed, 56 insertions(+), 0 deletions(-)
.gitignore created+2| ... | @@ -0,0 +1,2 @@ | ||
| 1 | /bin | ||
| 2 | /zigmod* | ||
LICENSE created+21| ... | @@ -0,0 +1,21 @@ | ||
| 1 | MIT License | ||
| 2 | |||
| 3 | Copyright (c) 2020 Meghan Denny | ||
| 4 | |||
| 5 | Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| 6 | of this software and associated documentation files (the "Software"), to deal | ||
| 7 | in the Software without restriction, including without limitation the rights | ||
| 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| 9 | copies of the Software, and to permit persons to whom the Software is | ||
| 10 | furnished to do so, subject to the following conditions: | ||
| 11 | |||
| 12 | The above copyright notice and this permission notice shall be included in all | ||
| 13 | copies or substantial portions of the Software. | ||
| 14 | |||
| 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| 21 | SOFTWARE. | ||
build_all.sh created+29| ... | @@ -0,0 +1,29 @@ | ||
| 1 | #!/usr/bin/env bash | ||
| 2 | |||
| 3 | # set -e | ||
| 4 | |||
| 5 | build_template() { | ||
| 6 | export CGO_ENABLED=0 | ||
| 7 | export GOOS=$1 | ||
| 8 | export GOARCH=$2 | ||
| 9 | export GOARM=7 | ||
| 10 | ext=$3 | ||
| 11 | date=$(date +'%Y.%m.%d') | ||
| 12 | version=${CIRCLE_BUILD_NUM-$date} | ||
| 13 | tag=v$version-$(git log --format=%h -1) | ||
| 14 | echo $tag-$GOOS-$GOARCH | ||
| 15 | go build -ldflags="-s -w -X main.Version=$tag" -o ./bin/zigmod-$tag-$GOOS-$GOARCH$ext | ||
| 16 | } | ||
| 17 | |||
| 18 | # go tool dist list | grep amd64 | ||
| 19 | # build_template android amd64 | ||
| 20 | build_template darwin amd64 | ||
| 21 | build_template dragonfly amd64 | ||
| 22 | build_template freebsd amd64 | ||
| 23 | build_template illumos amd64 | ||
| 24 | build_template linux amd64 | ||
| 25 | build_template netbsd amd64 | ||
| 26 | build_template openbsd amd64 | ||
| 27 | build_template plan9 amd64 | ||
| 28 | build_template solaris amd64 | ||
| 29 | build_template windows amd64 .exe | ||
main.go created+4| ... | @@ -0,0 +1,4 @@ | ||
| 1 | |||
| 2 | func assert(x bool, msg string) { | ||
| 3 | 	util.DieOnError(util.Assert(x, msg)) | ||
| 4 | } | ||