Skip to content

Commit

Permalink
Run go-makefile-maker
Browse files Browse the repository at this point in the history
  • Loading branch information
sapcc-bot committed Jan 22, 2025
1 parent 57dbf8c commit 782028c
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .envrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# SPDX-License-Identifier: Apache-2.0
if type -P lorri &>/dev/null; then
eval "$(lorri direnv)"
else
elif type -P nix &>/dev/null; then
use nix
else
echo "Found no nix binary. Skipping activating nix-shell..."
fi
2 changes: 1 addition & 1 deletion .github/workflows/checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/setup-go@v5
with:
check-latest: true
go-version: 1.23.4
go-version: 1.23.5
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/setup-go@v5
with:
check-latest: true
go-version: 1.23.4
go-version: 1.23.5
- name: Build all binaries
run: make build-all
test:
Expand All @@ -47,6 +47,6 @@ jobs:
uses: actions/setup-go@v5
with:
check-latest: true
go-version: 1.23.4
go-version: 1.23.5
- name: Run tests and generate coverage report
run: make build/cover.out
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
uses: actions/setup-go@v5
with:
check-latest: true
go-version: 1.23.4
go-version: 1.23.5
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .license-scan-overrides.jsonl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{"name": "github.com/chzyer/logex", "licenceType": "MIT"}
{"name": "github.com/hashicorp/vault/api/auth/approle", "licenceType": "MPL-2.0"}
{"name": "github.com/jpillora/longestcommon", "licenceType": "MIT"}
{"name": "github.com/miekg/dns", "licenceType": "BSD-3-Clause"}
{"name": "github.com/spdx/tools-golang", "licenceTextOverrideFile": "vendor/github.com/spdx/tools-golang/LICENSE.code"}
{"name": "github.com/xeipuuv/gojsonpointer", "licenceType": "Apache-2.0"}
{"name": "github.com/xeipuuv/gojsonreference", "licenceType": "Apache-2.0"}
Expand Down
4 changes: 3 additions & 1 deletion .license-scan-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@
"allowlist": [
"Apache-2.0",
"BSD-2-Clause",
"BSD-2-Clause-FreeBSD",
"BSD-3-Clause",
"ISC",
"MIT",
"MPL-2.0",
"Unlicense"
"Unlicense",
"Zlib"
]
}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.23.4-alpine3.21 AS builder
FROM golang:1.23.5-alpine3.21 AS builder

RUN apk add --no-cache --no-progress ca-certificates gcc git make musl-dev

Expand All @@ -16,7 +16,7 @@ RUN addgroup -g 4200 appgroup \
# upgrade all installed packages to fix potential CVEs in advance
# also remove apk package manager to hopefully remove dependency on OpenSSL 🤞
RUN apk upgrade --no-cache --no-progress \
&& apk del --no-cache --no-progress apk-tools alpine-keys
&& apk del --no-cache --no-progress apk-tools alpine-keys alpine-release libc-utils

COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs/
COPY --from=builder /etc/ssl/cert.pem /etc/ssl/cert.pem
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@ check-dependency-licenses: FORCE install-go-licence-detector
@printf "\e[1;36m>> go-licence-detector\e[0m\n"
@go list -m -mod=readonly -json all | go-licence-detector -includeIndirect -rules .license-scan-rules.json -overrides .license-scan-overrides.jsonl

goimports: FORCE
@printf "\e[1;36m>> goimports -w -local https://github.com/sapcc/argora\e[0m\n"
@goimports -w -local github.com/sapcc/tf-registry $(patsubst $(shell awk '$$1 == "module" {print $$2}' go.mod)%,.%/*.go,$(shell go list ./...))

clean: FORCE
git clean -dxf build

Expand Down Expand Up @@ -157,6 +161,7 @@ help: FORCE
@printf " \e[36mlicense-headers\e[0m Add license headers to all non-vendored source code files.\n"
@printf " \e[36mcheck-license-headers\e[0m Check license headers in all non-vendored .go files.\n"
@printf " \e[36mcheck-dependency-licenses\e[0m Check all dependency licenses using go-licence-detector.\n"
@printf " \e[36mgoimports\e[0m Run goimports on all non-vendored .go files\n"
@printf " \e[36mclean\e[0m Run git clean.\n"

.PHONY: FORCE

0 comments on commit 782028c

Please sign in to comment.