Skip to content

Commit

Permalink
v2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sbreitf1 committed Feb 18, 2021
1 parent 8e1a24d commit 595d0d1
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

Creating releases for sensu is handled by GitHub Actions.

- run `./publish_release.sh v1.x.y` (and commit interactively)
- run `./publish_release.sh v2.x.y` (and commit interactively)
- apply `sensu/asset.yaml` via sensuctl
Binary file removed artifacts/sensu-webwhois_v2.1.1_linux_amd64.tar.gz
Binary file not shown.
1 change: 0 additions & 1 deletion artifacts/sensu-webwhois_v2.1.1_sha512_checksums.txt

This file was deleted.

Binary file not shown.
1 change: 1 addition & 0 deletions artifacts/sensu-webwhois_v2.2.0_sha512_checksums.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
d21e5e67f40ffbef5dca6c654874c4e6a13fe7d52bdda13ac7658c28e4da55bcbe3aaf4027274e12282a9c4b8bd2b108c11f236f0b14cf7828bb141825edbf56 sensu-webwhois_v2.2.0_linux_amd64.tar.gz
Binary file modified bin/sensu-webwhois
Binary file not shown.
9 changes: 8 additions & 1 deletion cmd/sensu-webwhois/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@ var (
timeBegin = time.Now()
httpResp *http.Response
domainToCheck string
webWhoisURL string
fails int
)

func main() {
whiteflag.Alias("d", "domain", "use the given domain for check order")
whiteflag.Alias("a", "address", "full webwhois url")
domainToCheck = whiteflag.GetString("domain")
if whiteflag.FlagPresent("address") {
webWhoisURL = whiteflag.GetString("address")
} else {
webWhoisURL = "https://www.denic.de/webwhois/"
}

run()
}
Expand All @@ -45,7 +52,7 @@ func run() {
os.Setenv("http_proxy", "")
os.Setenv("https_proxy", "")

httpReq, err := http.NewRequest("POST", "https://www.denic.de/webwhois/", postBody)
httpReq, err := http.NewRequest("POST", webWhoisURL, postBody)
if err != nil {
printFailMetricsAndExit(err.Error())
}
Expand Down
4 changes: 2 additions & 2 deletions publish_release.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash

if [[ -z "$1" ]]; then
echo "need tag/version in format v1.x.y"
echo "need tag/version in format v2.x.y"
exit 1
else
TAG=$1
fi

CGO_ENABLED=0 go build -o bin/sensu-webwhois cmd/sensu-webwhois/main.go
CGO_ENABLED=0 go build -o bin/sensu-webwhois ./cmd/sensu-webwhois
tar czf sensu-webwhois_${TAG}_linux_amd64.tar.gz bin/

sha512sum sensu-webwhois_${TAG}_linux_amd64.tar.gz > sensu-webwhois_${TAG}_sha512_checksums.txt
Expand Down
4 changes: 2 additions & 2 deletions sensu/asset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ api_version: core/v2
metadata:
name: sensu-webwhois
spec:
sha512: ec9bbc5acbc16f928bf557ddd3d688d66a130ca18ff49fe8a0211ca0fb331159e9aa48f28aa34fada9cea315abd98e13ee748cb7fd926c6343662b6051a2b7e7
url: https://github.com/DENICeG/sensu-webwhois/releases/download/v2.1.1/sensu-webwhois_v2.1.1_linux_amd64.tar.gz
sha512: d21e5e67f40ffbef5dca6c654874c4e6a13fe7d52bdda13ac7658c28e4da55bcbe3aaf4027274e12282a9c4b8bd2b108c11f236f0b14cf7828bb141825edbf56
url: https://github.com/DENICeG/sensu-webwhois/releases/download/v2.2.0/sensu-webwhois_v2.2.0_linux_amd64.tar.gz

0 comments on commit 595d0d1

Please sign in to comment.