Skip to content

Commit 595d0d1

Browse files
committed
v2.2.0
1 parent 8e1a24d commit 595d0d1

9 files changed

+14
-7
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
Creating releases for sensu is handled by GitHub Actions.
44

5-
- run `./publish_release.sh v1.x.y` (and commit interactively)
5+
- run `./publish_release.sh v2.x.y` (and commit interactively)
66
- apply `sensu/asset.yaml` via sensuctl
Binary file not shown.

artifacts/sensu-webwhois_v2.1.1_sha512_checksums.txt

-1
This file was deleted.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
d21e5e67f40ffbef5dca6c654874c4e6a13fe7d52bdda13ac7658c28e4da55bcbe3aaf4027274e12282a9c4b8bd2b108c11f236f0b14cf7828bb141825edbf56 sensu-webwhois_v2.2.0_linux_amd64.tar.gz

bin/sensu-webwhois

4.04 KB
Binary file not shown.

cmd/sensu-webwhois/main.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,19 @@ var (
1717
timeBegin = time.Now()
1818
httpResp *http.Response
1919
domainToCheck string
20+
webWhoisURL string
2021
fails int
2122
)
2223

2324
func main() {
2425
whiteflag.Alias("d", "domain", "use the given domain for check order")
26+
whiteflag.Alias("a", "address", "full webwhois url")
2527
domainToCheck = whiteflag.GetString("domain")
28+
if whiteflag.FlagPresent("address") {
29+
webWhoisURL = whiteflag.GetString("address")
30+
} else {
31+
webWhoisURL = "https://www.denic.de/webwhois/"
32+
}
2633

2734
run()
2835
}
@@ -45,7 +52,7 @@ func run() {
4552
os.Setenv("http_proxy", "")
4653
os.Setenv("https_proxy", "")
4754

48-
httpReq, err := http.NewRequest("POST", "https://www.denic.de/webwhois/", postBody)
55+
httpReq, err := http.NewRequest("POST", webWhoisURL, postBody)
4956
if err != nil {
5057
printFailMetricsAndExit(err.Error())
5158
}

publish_release.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
22

33
if [[ -z "$1" ]]; then
4-
echo "need tag/version in format v1.x.y"
4+
echo "need tag/version in format v2.x.y"
55
exit 1
66
else
77
TAG=$1
88
fi
99

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

1313
sha512sum sensu-webwhois_${TAG}_linux_amd64.tar.gz > sensu-webwhois_${TAG}_sha512_checksums.txt

sensu/asset.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ api_version: core/v2
33
metadata:
44
name: sensu-webwhois
55
spec:
6-
sha512: ec9bbc5acbc16f928bf557ddd3d688d66a130ca18ff49fe8a0211ca0fb331159e9aa48f28aa34fada9cea315abd98e13ee748cb7fd926c6343662b6051a2b7e7
7-
url: https://github.com/DENICeG/sensu-webwhois/releases/download/v2.1.1/sensu-webwhois_v2.1.1_linux_amd64.tar.gz
6+
sha512: d21e5e67f40ffbef5dca6c654874c4e6a13fe7d52bdda13ac7658c28e4da55bcbe3aaf4027274e12282a9c4b8bd2b108c11f236f0b14cf7828bb141825edbf56
7+
url: https://github.com/DENICeG/sensu-webwhois/releases/download/v2.2.0/sensu-webwhois_v2.2.0_linux_amd64.tar.gz

0 commit comments

Comments
 (0)