Skip to content

Commit 52d9569

Browse files
author
sapcc-bot
committed
Run go-makefile-maker
1 parent 16aae2a commit 52d9569

File tree

2 files changed

+28
-12
lines changed

2 files changed

+28
-12
lines changed

.github/renovate.json

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,13 @@
2323
"packageRules": [
2424
{
2525
"matchPackageNames": [
26-
"go",
27-
"golang"
26+
"/.*/"
27+
],
28+
"matchUpdateTypes": [
29+
"minor",
30+
"patch"
2831
],
29-
"allowedVersions": "1.24.x"
32+
"groupName": "External dependencies"
3033
},
3134
{
3235
"matchPackageNames": [
@@ -37,14 +40,24 @@
3740
},
3841
{
3942
"matchPackageNames": [
40-
"!/^github\\.com\\/sapcc\\/.*/",
41-
"/.*/"
43+
"go",
44+
"golang",
45+
"actions/go-versions"
46+
],
47+
"groupName": "golang",
48+
"separateMinorPatch": true
49+
},
50+
{
51+
"matchPackageNames": [
52+
"go",
53+
"golang",
54+
"actions/go-versions"
4255
],
4356
"matchUpdateTypes": [
4457
"minor",
45-
"patch"
58+
"major"
4659
],
47-
"groupName": "External dependencies"
60+
"dependencyDashboardApproval": true
4861
}
4962
],
5063
"prHourlyLimit": 0,

Makefile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,11 @@ install-reuse: FORCE
4848

4949
prepare-static-check: FORCE install-golangci-lint install-modernize install-shellcheck install-go-licence-detector install-addlicense install-reuse
5050

51-
GO_BUILDFLAGS =
52-
GO_LDFLAGS =
53-
GO_TESTENV =
54-
GO_BUILDENV =
51+
GO_BUILDFLAGS := $(GO_BUILDFLAGS)
52+
GO_LDFLAGS := $(GO_LDFLAGS)
53+
GO_TESTFLAGS := $(GO_TESTFLAGS)
54+
GO_TESTENV := $(GO_TESTENV)
55+
GO_BUILDENV := $(GO_BUILDENV)
5556

5657
# These definitions are overridable, e.g. to provide fixed version/commit values when
5758
# no .git directory is present or to provide a fixed build date for reproducibility.
@@ -89,7 +90,7 @@ run-shellcheck: FORCE install-shellcheck
8990

9091
build/cover.out: FORCE | build
9192
@printf "\e[1;36m>> Running tests\e[0m\n"
92-
@env $(GO_TESTENV) go test -shuffle=on -p 1 -coverprofile=build/coverprofile.out $(GO_BUILDFLAGS) -ldflags '-s -w -X github.com/sapcc/go-api-declarations/bininfo.binName=v2 -X github.com/sapcc/go-api-declarations/bininfo.version=$(BININFO_VERSION) -X github.com/sapcc/go-api-declarations/bininfo.commit=$(BININFO_COMMIT_HASH) -X github.com/sapcc/go-api-declarations/bininfo.buildDate=$(BININFO_BUILD_DATE) $(GO_LDFLAGS)' -covermode=count -coverpkg=$(subst $(space),$(comma),$(GO_COVERPKGS)) $(GO_TESTPKGS)
93+
@env $(GO_TESTENV) go test -shuffle=on -p 1 -coverprofile=build/coverprofile.out $(GO_BUILDFLAGS) -ldflags '-s -w -X github.com/sapcc/go-api-declarations/bininfo.binName=v2 -X github.com/sapcc/go-api-declarations/bininfo.version=$(BININFO_VERSION) -X github.com/sapcc/go-api-declarations/bininfo.commit=$(BININFO_COMMIT_HASH) -X github.com/sapcc/go-api-declarations/bininfo.buildDate=$(BININFO_BUILD_DATE) $(GO_LDFLAGS)' -covermode=count -coverpkg=$(subst $(space),$(comma),$(GO_COVERPKGS)) $(GO_TESTFLAGS) $(GO_TESTPKGS)
9394
@awk < build/coverprofile.out '$$1 != "mode:" { is_filename[$$1] = true; counts1[$$1]+=$$2; counts2[$$1]+=$$3 } END { for (filename in is_filename) { printf "%s %d %d\n", filename, counts1[filename], counts2[filename]; } }' | sort | $(SED) '1s/^/mode: count\n/' > $@
9495

9596
build/cover.html: build/cover.out
@@ -146,10 +147,12 @@ vars: FORCE
146147
@printf "BININFO_BUILD_DATE=$(BININFO_BUILD_DATE)\n"
147148
@printf "BININFO_COMMIT_HASH=$(BININFO_COMMIT_HASH)\n"
148149
@printf "BININFO_VERSION=$(BININFO_VERSION)\n"
150+
@printf "GO_BUILDENV=$(GO_BUILDENV)\n"
149151
@printf "GO_BUILDFLAGS=$(GO_BUILDFLAGS)\n"
150152
@printf "GO_COVERPKGS=$(GO_COVERPKGS)\n"
151153
@printf "GO_LDFLAGS=$(GO_LDFLAGS)\n"
152154
@printf "GO_TESTENV=$(GO_TESTENV)\n"
155+
@printf "GO_TESTFLAGS=$(GO_TESTFLAGS)\n"
153156
@printf "GO_TESTPKGS=$(GO_TESTPKGS)\n"
154157
@printf "MAKE=$(MAKE)\n"
155158
@printf "SED=$(SED)\n"

0 commit comments

Comments
 (0)