Skip to content

Commit 1518898

Browse files
authored
Merge pull request #10 from SuperQ/superq/release_0.3.0
Release v0.3.0
2 parents 1440baa + 2a9fd61 commit 1518898

5 files changed

Lines changed: 72 additions & 322 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## main / unreleased
22

3+
## 0.3.0 / 2022-07-11
4+
5+
* [CHANGE] Fix tracking info metric #8
6+
* [CHANGE] Adjust tracking name parsing #9
7+
38
## 0.2.0 / 2022-05-19
49

510
* [BUGFIX] Update Go client to reduce metrics cardinality

Makefile.common

Lines changed: 11 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -36,29 +36,6 @@ GO_VERSION ?= $(shell $(GO) version)
3636
GO_VERSION_NUMBER ?= $(word 3, $(GO_VERSION))
3737
PRE_GO_111 ?= $(shell echo $(GO_VERSION_NUMBER) | grep -E 'go1\.(10|[0-9])\.')
3838

39-
GOVENDOR :=
40-
GO111MODULE :=
41-
ifeq (, $(PRE_GO_111))
42-
ifneq (,$(wildcard go.mod))
43-
# Enforce Go modules support just in case the directory is inside GOPATH (and for Travis CI).
44-
GO111MODULE := on
45-
46-
ifneq (,$(wildcard vendor))
47-
# Always use the local vendor/ directory to satisfy the dependencies.
48-
GOOPTS := $(GOOPTS) -mod=vendor
49-
endif
50-
endif
51-
else
52-
ifneq (,$(wildcard go.mod))
53-
ifneq (,$(wildcard vendor))
54-
$(warning This repository requires Go >= 1.11 because of Go modules)
55-
$(warning Some recipes may not work as expected as the current Go runtime is '$(GO_VERSION_NUMBER)')
56-
endif
57-
else
58-
# This repository isn't using Go modules (yet).
59-
GOVENDOR := $(FIRST_GOPATH)/bin/govendor
60-
endif
61-
endif
6239
PROMU := $(FIRST_GOPATH)/bin/promu
6340
pkgs = ./...
6441

@@ -150,58 +127,47 @@ common-check_license:
150127
.PHONY: common-deps
151128
common-deps:
152129
@echo ">> getting dependencies"
153-
ifdef GO111MODULE
154-
GO111MODULE=$(GO111MODULE) $(GO) mod download
155-
else
156-
$(GO) get $(GOOPTS) -t ./...
157-
endif
130+
$(GO) mod download
158131

159132
.PHONY: update-go-deps
160133
update-go-deps:
161134
@echo ">> updating Go dependencies"
162135
@for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \
163136
$(GO) get -d $$m; \
164137
done
165-
GO111MODULE=$(GO111MODULE) $(GO) mod tidy
166-
ifneq (,$(wildcard vendor))
167-
GO111MODULE=$(GO111MODULE) $(GO) mod vendor
168-
endif
138+
$(GO) mod tidy
169139

170140
.PHONY: common-test-short
171141
common-test-short: $(GOTEST_DIR)
172142
@echo ">> running short tests"
173-
GO111MODULE=$(GO111MODULE) $(GOTEST) -short $(GOOPTS) $(pkgs)
143+
$(GOTEST) -short $(GOOPTS) $(pkgs)
174144

175145
.PHONY: common-test
176146
common-test: $(GOTEST_DIR)
177147
@echo ">> running all tests"
178-
GO111MODULE=$(GO111MODULE) $(GOTEST) $(test-flags) $(GOOPTS) $(pkgs)
148+
$(GOTEST) $(test-flags) $(GOOPTS) $(pkgs)
179149

180150
$(GOTEST_DIR):
181151
@mkdir -p $@
182152

183153
.PHONY: common-format
184154
common-format:
185155
@echo ">> formatting code"
186-
GO111MODULE=$(GO111MODULE) $(GO) fmt $(pkgs)
156+
$(GO) fmt $(pkgs)
187157

188158
.PHONY: common-vet
189159
common-vet:
190160
@echo ">> vetting code"
191-
GO111MODULE=$(GO111MODULE) $(GO) vet $(GOOPTS) $(pkgs)
161+
$(GO) vet $(GOOPTS) $(pkgs)
192162

193163
.PHONY: common-lint
194164
common-lint: $(GOLANGCI_LINT)
195165
ifdef GOLANGCI_LINT
196166
@echo ">> running golangci-lint"
197-
ifdef GO111MODULE
198167
# 'go list' needs to be executed before staticcheck to prepopulate the modules cache.
199168
# Otherwise staticcheck might fail randomly for some reason not yet explained.
200-
GO111MODULE=$(GO111MODULE) $(GO) list -e -compiled -test=true -export=false -deps=true -find=false -tags= -- ./... > /dev/null
201-
GO111MODULE=$(GO111MODULE) $(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs)
202-
else
203-
$(GOLANGCI_LINT) run $(pkgs)
204-
endif
169+
$(GO) list -e -compiled -test=true -export=false -deps=true -find=false -tags= -- ./... > /dev/null
170+
$(GOLANGCI_LINT) run $(GOLANGCI_LINT_OPTS) $(pkgs)
205171
endif
206172

207173
.PHONY: common-yamllint
@@ -218,28 +184,15 @@ endif
218184
common-staticcheck: lint
219185

220186
.PHONY: common-unused
221-
common-unused: $(GOVENDOR)
222-
ifdef GOVENDOR
223-
@echo ">> running check for unused packages"
224-
@$(GOVENDOR) list +unused | grep . && exit 1 || echo 'No unused packages'
225-
else
226-
ifdef GO111MODULE
187+
common-unused:
227188
@echo ">> running check for unused/missing packages in go.mod"
228-
GO111MODULE=$(GO111MODULE) $(GO) mod tidy
229-
ifeq (,$(wildcard vendor))
189+
$(GO) mod tidy
230190
@git diff --exit-code -- go.sum go.mod
231-
else
232-
@echo ">> running check for unused packages in vendor/"
233-
GO111MODULE=$(GO111MODULE) $(GO) mod vendor
234-
@git diff --exit-code -- go.sum go.mod vendor/
235-
endif
236-
endif
237-
endif
238191

239192
.PHONY: common-build
240193
common-build: promu
241194
@echo ">> building binaries"
242-
GO111MODULE=$(GO111MODULE) $(PROMU) build --prefix $(PREFIX) $(PROMU_BINARIES)
195+
$(PROMU) build --prefix $(PREFIX) $(PROMU_BINARIES)
243196

244197
.PHONY: common-tarball
245198
common-tarball: promu
@@ -295,12 +248,6 @@ $(GOLANGCI_LINT):
295248
| sh -s -- -b $(FIRST_GOPATH)/bin $(GOLANGCI_LINT_VERSION)
296249
endif
297250

298-
ifdef GOVENDOR
299-
.PHONY: $(GOVENDOR)
300-
$(GOVENDOR):
301-
GOOS= GOARCH= $(GO) get -u github.com/kardianos/govendor
302-
endif
303-
304251
.PHONY: precheck
305252
precheck::
306253

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.2.0
1+
0.3.0

go.mod

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ module github.com/superq/chrony_exporter
33
go 1.17
44

55
require (
6-
github.com/facebook/time v0.0.0-20220517155014-60da4410df5a
6+
github.com/facebook/time v0.0.0-20220708172321-77a8e2e9790d
77
github.com/go-kit/log v0.2.1
88
github.com/prometheus/client_golang v1.12.2
9-
github.com/prometheus/common v0.35.0
9+
github.com/prometheus/common v0.36.0
1010
github.com/prometheus/exporter-toolkit v0.7.1
1111
gopkg.in/alecthomas/kingpin.v2 v2.2.6
1212
)
@@ -19,16 +19,17 @@ require (
1919
github.com/go-logfmt/logfmt v0.5.1 // indirect
2020
github.com/golang/protobuf v1.5.2 // indirect
2121
github.com/jpillora/backoff v1.0.0 // indirect
22+
github.com/kr/pretty v0.3.0 // indirect
2223
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
2324
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
2425
github.com/pkg/errors v0.9.1 // indirect
2526
github.com/prometheus/client_model v0.2.0 // indirect
2627
github.com/prometheus/procfs v0.7.3 // indirect
2728
github.com/sirupsen/logrus v1.8.1 // indirect
28-
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e // indirect
29-
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
29+
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
30+
golang.org/x/net v0.0.0-20220524220425-1d687d428aca // indirect
3031
golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b // indirect
31-
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect
32+
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect
3233
golang.org/x/text v0.3.7 // indirect
3334
google.golang.org/appengine v1.6.7 // indirect
3435
google.golang.org/protobuf v1.26.0 // indirect

0 commit comments

Comments
 (0)