From a64475213370e5bf2b5a0fc003af5d9aaae4ae47 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 4 Jul 2019 18:32:36 -0600 Subject: [PATCH] v1.2.1: README and build updates --- README.md | 8 ++++---- build-all.sh | 29 ++++++++++++++++------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 8ae3511..8283964 100644 --- a/README.md +++ b/README.md @@ -205,10 +205,10 @@ command="systemctl restart foo.service",no-port-forwarding,no-x11-forwarding,no-
{{ .Name }} and other template variables -`{{ .Name }}` is the name of your site. -`{{ .Message }}` is either `went down` or `came back up`. -`{{ .Status }}` is either `up` or `down`. -`{{ .Watchdog }}` is the name of your watchdog (useful if you have multiple). +- `{{ .Name }}` is the name of your site. +- `{{ .Message }}` is either `went down` or `came back up`. +- `{{ .Status }}` is either `up` or `down`. +- `{{ .Watchdog }}` is the name of your watchdog (useful if you have multiple). It refers to the name of the watch, which is "Example Site" in the sample config below. diff --git a/build-all.sh b/build-all.sh index 8bac14f..ed41c78 100644 --- a/build-all.sh +++ b/build-all.sh @@ -5,41 +5,44 @@ export CGO_ENABLED=0 exe=watchdog +distpre=../.. gocmd=. echo "" go generate -mod=vendor ./... +pushd cmd/${exe} echo "" echo "Windows amd64" -#GOOS=windows GOARCH=amd64 go build -mod=vendor -o dist/windows/amd64/${exe}.exe -ldflags "-H=windowsgui" $gocmd -#GOOS=windows GOARCH=amd64 go build -mod=vendor -o dist/windows/amd64/${exe}.debug.exe -GOOS=windows GOARCH=amd64 go build -mod=vendor -o dist/windows/amd64/${exe}.exe +#GOOS=windows GOARCH=amd64 go build -mod=vendor -o ${distpre}/dist/windows/amd64/${exe}.exe -ldflags "-H=windowsgui" $gocmd +#GOOS=windows GOARCH=amd64 go build -mod=vendor -o ${distpre}/dist/windows/amd64/${exe}.debug.exe +GOOS=windows GOARCH=amd64 go build -mod=vendor -o ${distpre}/dist/windows/amd64/${exe}.exe echo "Windows 386" -#GOOS=windows GOARCH=386 go build -mod=vendor -o dist/windows/386/${exe}.exe -ldflags "-H=windowsgui" $gocmd -#GOOS=windows GOARCH=386 go build -mod=vendor -o dist/windows/386/${exe}.debug.exe -GOOS=windows GOARCH=386 go build -mod=vendor -o dist/windows/386/${exe}.exe +#GOOS=windows GOARCH=386 go build -mod=vendor -o ${distpre}/dist/windows/386/${exe}.exe -ldflags "-H=windowsgui" $gocmd +#GOOS=windows GOARCH=386 go build -mod=vendor -o ${distpre}/dist/windows/386/${exe}.debug.exe +GOOS=windows GOARCH=386 go build -mod=vendor -o ${distpre}/dist/windows/386/${exe}.exe echo "" echo "Darwin (macOS) amd64" -GOOS=darwin GOARCH=amd64 go build -mod=vendor -o dist/darwin/amd64/${exe} $gocmd +GOOS=darwin GOARCH=amd64 go build -mod=vendor -o ${distpre}/dist/darwin/amd64/${exe} $gocmd echo "" echo "Linux amd64" -GOOS=linux GOARCH=amd64 go build -mod=vendor -o dist/linux/amd64/${exe} $gocmd +GOOS=linux GOARCH=amd64 go build -mod=vendor -o ${distpre}/dist/linux/amd64/${exe} $gocmd echo "Linux 386" -GOOS=linux GOARCH=386 go build -mod=vendor -o dist/linux/386/${exe} $gocmd +GOOS=linux GOARCH=386 go build -mod=vendor -o ${distpre}/dist/linux/386/${exe} $gocmd echo "" echo "RPi 4 (64-bit) ARMv8" -GOOS=linux GOARCH=arm64 go build -mod=vendor -o dist/linux/armv8/${exe} $gocmd +GOOS=linux GOARCH=arm64 go build -mod=vendor -o ${distpre}/dist/linux/armv8/${exe} $gocmd echo "RPi 3 B+ ARMv7" -GOOS=linux GOARCH=arm GOARM=7 go build -mod=vendor -o dist/linux/armv7/${exe} $gocmd +GOOS=linux GOARCH=arm GOARM=7 go build -mod=vendor -o ${distpre}/dist/linux/armv7/${exe} $gocmd echo "ARMv6" -GOOS=linux GOARCH=arm GOARM=6 go build -mod=vendor -o dist/linux/armv6/${exe} $gocmd +GOOS=linux GOARCH=arm GOARM=6 go build -mod=vendor -o ${distpre}/dist/linux/armv6/${exe} $gocmd echo "RPi Zero ARMv5" -GOOS=linux GOARCH=arm GOARM=5 go build -mod=vendor -o dist/linux/armv5/${exe} $gocmd +GOOS=linux GOARCH=arm GOARM=5 go build -mod=vendor -o ${distpre}/dist/linux/armv5/${exe} $gocmd echo "" +popd rsync -av ./dist/ ubuntu@rootprojects.org:/srv/www/rootprojects.org/$exe/dist/ # https://rootprojects.org/serviceman/dist/windows/amd64/serviceman.exe