From 8c279bd63296fc7fd85ac13dc9fdd2ce39b23906 Mon Sep 17 00:00:00 2001 From: sapcc-bot Date: Thu, 28 Nov 2024 18:02:35 +0000 Subject: [PATCH] Run go-makefile-maker --- .github/workflows/checks.yaml | 16 ++++++++++++++++ .github/workflows/ci.yaml | 16 ++++++++++++++++ .github/workflows/codeql.yaml | 16 ++++++++++++++++ .golangci.yaml | 16 ++++++++++++++++ Makefile | 20 ++++++++++++++++++-- shell.nix | 13 ++----------- 6 files changed, 84 insertions(+), 13 deletions(-) diff --git a/.github/workflows/checks.yaml b/.github/workflows/checks.yaml index 6b8c1db4..d63f3707 100644 --- a/.github/workflows/checks.yaml +++ b/.github/workflows/checks.yaml @@ -3,6 +3,22 @@ # Edit Makefile.maker.yaml instead. # ################################################################################ +# Copyright 2024 SAP SE +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + name: Checks "on": push: diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b7e33af5..09b4c294 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,6 +3,22 @@ # Edit Makefile.maker.yaml instead. # ################################################################################ +# Copyright 2024 SAP SE +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + name: CI "on": push: diff --git a/.github/workflows/codeql.yaml b/.github/workflows/codeql.yaml index ffe7a865..59343811 100644 --- a/.github/workflows/codeql.yaml +++ b/.github/workflows/codeql.yaml @@ -3,6 +3,22 @@ # Edit Makefile.maker.yaml instead. # ################################################################################ +# Copyright 2024 SAP SE +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + name: CodeQL "on": push: diff --git a/.golangci.yaml b/.golangci.yaml index f1ea8e7d..34c3175e 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -3,6 +3,22 @@ # Edit Makefile.maker.yaml instead. # ################################################################################ +# Copyright 2024 SAP SE +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + run: timeout: 3m # 1m by default modules-download-mode: vendor diff --git a/Makefile b/Makefile index 2843c883..a1868410 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,22 @@ # Edit Makefile.maker.yaml instead. # ################################################################################ +# Copyright 2024 SAP SE +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + MAKEFLAGS=--warn-undefined-variables # /bin/sh is dash on Debian which does not support all features of ash/bash # to fix that we use /bin/bash only on Debian to not break Alpine @@ -109,7 +125,7 @@ check-license-headers: FORCE install-addlicense @printf "\e[1;36m>> addlicense --check\e[0m\n" @addlicense --check -- $(patsubst $(shell awk '$$1 == "module" {print $$2}' go.mod)%,.%/*.go,$(shell go list ./...)) -check-dependency-licenses: FORCE install go-licence-detector +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 @@ -139,7 +155,7 @@ help: FORCE @printf "\n" @printf "\e[1mPrepare\e[0m\n" @printf " \e[36minstall-golangci-lint\e[0m Install golangci-lint required by run-golangci-lint/static-check\n" - @printf " \e[36minstall-go-licence-detector\e[0m Install go-licence-detector required by check-dependency-licenses/static-check\n" + @printf " \e[36minstall-go-licence-detector\e[0m Install-go-licence-detector required by check-dependency-licenses/static-check\n" @printf " \e[36minstall-addlicense\e[0m Install addlicense required by check-license-headers/license-headers/static-check\n" @printf " \e[36mprepare-static-check\e[0m Install any tools required by static-check. This is used in CI before dropping privileges, you should probably install all the tools using your package manager\n" @printf "\n" diff --git a/shell.nix b/shell.nix index 05a12ff6..fe2fa8cf 100644 --- a/shell.nix +++ b/shell.nix @@ -1,18 +1,9 @@ +# SPDX-License-Identifier: Apache-2.0 + { pkgs ? import { } }: with pkgs; -let - # TODO: drop after https://github.com/NixOS/nixpkgs/pull/345260 got merged - postgresql_17 = (import (pkgs.path + /pkgs/servers/sql/postgresql/generic.nix) { - version = "17.0"; - hash = "sha256-fidhMcD91rYliNutmzuyS4w0mNUAkyjbpZrxboGRCd4="; - } { self = pkgs; jitSupport = false; }).overrideAttrs ({ nativeBuildInputs, configureFlags , ... }: { - nativeBuildInputs = nativeBuildInputs ++ (with pkgs; [ bison flex perl docbook_xml_dtd_45 docbook-xsl-nons libxslt ]); - configureFlags = configureFlags ++ [ "--without-perl" ]; - }); -in - mkShell { nativeBuildInputs = [ go-licence-detector