mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
workaround and fixes for MPL and copywrite bot (#18775)
This commit is contained in:
@@ -7,11 +7,8 @@ project {
|
||||
header_ignore = [
|
||||
"command/asset/*.hcl",
|
||||
"command/agent/bindata_assetfs.go",
|
||||
# licensed under MPL - ignoring for now until the copywrite tool can support
|
||||
# multiple licenses per repo.
|
||||
"api/**",
|
||||
"drivers/shared/**",
|
||||
"plugins/**",
|
||||
"ui/node_modules",
|
||||
|
||||
// Enterprise files do not fall under the open source licensing. OSS-ENT
|
||||
// merge conflicts might happen here, please be sure to put new OSS
|
||||
// exceptions above this comment.
|
||||
|
||||
2
.github/workflows/copywrite.yml
vendored
2
.github/workflows/copywrite.yml
vendored
@@ -14,6 +14,6 @@ jobs:
|
||||
version: v0.16.4
|
||||
archive-checksum: c299f830e6eef7e126a3c6ef99ac6f43a3c132d830c769e0d36fa347fa1af254
|
||||
- name: Check Header Compliance
|
||||
run: copywrite headers --plan
|
||||
run: make copywriteheaders
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
11
GNUmakefile
11
GNUmakefile
@@ -428,3 +428,14 @@ test: ## Use this target as a smoke test
|
||||
-count=1 \
|
||||
-tags "$(GO_TAGS)" \
|
||||
$(GOTEST_PKGS)
|
||||
|
||||
.PHONY: copywriteheaders
|
||||
copywriteheaders:
|
||||
copywrite headers --plan
|
||||
# Special case for MPL headers in /api, /drivers/shared, /plugins, /jobspec, /jobspec2, and /demo
|
||||
cd api && $(CURDIR)/scripts/copywrite-exceptions.sh
|
||||
cd drivers/shared && $(CURDIR)/scripts/copywrite-exceptions.sh
|
||||
cd plugins && $(CURDIR)/scripts/copywrite-exceptions.sh
|
||||
cd jobspec && $(CURDIR)/scripts/copywrite-exceptions.sh
|
||||
cd jobspec2 && $(CURDIR)/scripts/copywrite-exceptions.sh
|
||||
cd demo && $(CURDIR)/scripts/copywrite-exceptions.sh
|
||||
|
||||
8
api/.copywrite.hcl
Normal file
8
api/.copywrite.hcl
Normal file
@@ -0,0 +1,8 @@
|
||||
schema_version = 1
|
||||
|
||||
project {
|
||||
license = "MPL-2.0"
|
||||
copyright_year = 2023
|
||||
|
||||
header_ignore = []
|
||||
}
|
||||
@@ -1,3 +1,6 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
// Copyright (c) HashiCorp, Inc.
|
||||
// SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
package api
|
||||
|
||||
import (
|
||||
|
||||
8
demo/.copywrite.hcl
Normal file
8
demo/.copywrite.hcl
Normal file
@@ -0,0 +1,8 @@
|
||||
schema_version = 1
|
||||
|
||||
project {
|
||||
license = "MPL-2.0"
|
||||
copyright_year = 2023
|
||||
|
||||
header_ignore = []
|
||||
}
|
||||
8
drivers/shared/.copywrite.hcl
Normal file
8
drivers/shared/.copywrite.hcl
Normal file
@@ -0,0 +1,8 @@
|
||||
schema_version = 1
|
||||
|
||||
project {
|
||||
license = "MPL-2.0"
|
||||
copyright_year = 2023
|
||||
|
||||
header_ignore = []
|
||||
}
|
||||
8
jobspec/.copywrite.hcl
Normal file
8
jobspec/.copywrite.hcl
Normal file
@@ -0,0 +1,8 @@
|
||||
schema_version = 1
|
||||
|
||||
project {
|
||||
license = "MPL-2.0"
|
||||
copyright_year = 2023
|
||||
|
||||
header_ignore = []
|
||||
}
|
||||
8
jobspec2/.copywrite.hcl
Normal file
8
jobspec2/.copywrite.hcl
Normal file
@@ -0,0 +1,8 @@
|
||||
schema_version = 1
|
||||
|
||||
project {
|
||||
license = "MPL-2.0"
|
||||
copyright_year = 2023
|
||||
|
||||
header_ignore = []
|
||||
}
|
||||
8
plugins/.copywrite.hcl
Normal file
8
plugins/.copywrite.hcl
Normal file
@@ -0,0 +1,8 @@
|
||||
schema_version = 1
|
||||
|
||||
project {
|
||||
license = "MPL-2.0"
|
||||
copyright_year = 2023
|
||||
|
||||
header_ignore = []
|
||||
}
|
||||
14
scripts/copywrite-exceptions.sh
Executable file
14
scripts/copywrite-exceptions.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Used as a stopgap for copywrite bot in MPL-licensed subdirs, detects BUSL licensed
|
||||
# headers and deletes them, then runs the copywrite bot to utilize local subdir config
|
||||
# to inject correct headers.
|
||||
|
||||
find . -type f -name '*.go' | while read line; do
|
||||
if grep "SPDX-License-Identifier: BUSL-1.1" $line; then
|
||||
sed -i '/SPDX-License-Identifier: BUSL-1.1/d' $line
|
||||
sed -i '/Copyright (c) HashiCorp, Inc./d' $line
|
||||
fi
|
||||
done
|
||||
|
||||
copywrite headers --plan
|
||||
Reference in New Issue
Block a user