Skip to content

Commit 3c93dc2

Browse files
authored
CLOUDP-357342: Add go-licenses to Devbox (#2871)
1 parent 23feb82 commit 3c93dc2

File tree

3 files changed

+78
-31
lines changed

3 files changed

+78
-31
lines changed

Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,6 @@ endif
122122
GINKGO=ginkgo run $(GINKGO_OPTS) $(GINKGO_FILTER_LABEL_OPT)
123123

124124
BASE_GO_PACKAGE = github.com/mongodb/mongodb-atlas-kubernetes/v2
125-
GO_LICENSES = go-licenses
126-
GO_LICENSES_VERSION = 1.6.0
127125
DISALLOWED_LICENSES = restricted,reciprocal
128126

129127
SLACK_WEBHOOK ?= https://hooks.slack.com/services/...
@@ -215,7 +213,7 @@ build-licenses.csv: go.mod ## Track licenses in a CSV file
215213
export GOOS=linux
216214
export GOARCH=amd64
217215
GOTOOLCHAIN=local \
218-
go run github.com/google/$(GO_LICENSES)@v$(GO_LICENSES_VERSION) csv --include_tests $(BASE_GO_PACKAGE)/... > licenses.csv
216+
go-licenses csv --include_tests $(BASE_GO_PACKAGE)/... > licenses.csv
219217

220218
.PHONY: check-licenses
221219
check-licenses: ## Check licenses are compliant with our restrictions
@@ -224,7 +222,7 @@ check-licenses: ## Check licenses are compliant with our restrictions
224222
export GOOS=linux
225223
export GOARCH=amd64
226224
GOTOOLCHAIN=local \
227-
go run github.com/google/$(GO_LICENSES)@v$(GO_LICENSES_VERSION) check --include_tests \
225+
go-licenses check --include_tests \
228226
--disallowed_types $(DISALLOWED_LICENSES) $(BASE_GO_PACKAGE)/...
229227
@echo "--------------------"
230228
@echo "Licenses check: PASS"

devbox.json

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,37 @@
11
{
22
"packages": {
3-
"yq-go": "latest",
4-
"kubebuilder": "4.1.1",
5-
"jq": "latest",
6-
"gotests": "latest",
7-
"act": "latest",
8-
"kubectl": "latest",
9-
"docker": "latest",
10-
"kustomize": "latest",
11-
"git": "latest",
12-
"gettext": "latest",
13-
"wget": "latest",
14-
"cosign": "latest",
15-
"kubernetes-helm": "latest",
16-
"govulncheck": "latest",
17-
"gotools": "latest",
18-
"ginkgo": "latest",
19-
"operator-sdk": "1.36.1",
20-
"shellcheck": "latest",
21-
"golangci-lint": "2",
3+
"yq-go": "latest",
4+
"kubebuilder": "4.1.1",
5+
"jq": "latest",
6+
"gotests": "latest",
7+
"act": "latest",
8+
"kubectl": "latest",
9+
"docker": "latest",
10+
"kustomize": "latest",
11+
"git": "latest",
12+
"gettext": "latest",
13+
"wget": "latest",
14+
"cosign": "latest",
15+
"kubernetes-helm": "latest",
16+
"govulncheck": "latest",
17+
"gotools": "latest",
18+
"ginkgo": "latest",
19+
"operator-sdk": "1.36.1",
20+
"shellcheck": "latest",
21+
"golangci-lint": "2",
2222
"kubernetes-controller-tools": "0.17.2",
23-
"setup-envtest": "0.19.0",
24-
"awscli2": "latest",
25-
"docker-sbom": "latest",
26-
"openshift": "latest",
27-
"gh": "latest",
28-
"addlicense": "latest",
29-
"fd": "latest",
23+
"setup-envtest": "0.19.0",
24+
"awscli2": "latest",
25+
"docker-sbom": "latest",
26+
"openshift": "latest",
27+
"gh": "latest",
28+
"addlicense": "latest",
29+
"fd": "latest",
3030
"apple-sdk_12": {
3131
"version": "latest",
3232
"platforms": ["aarch64-darwin", "x86_64-darwin"]
3333
},
34-
"path:./flakes/go": {}
34+
"path:./flakes/go": {},
35+
"go-licenses": "1.6.0"
3536
}
3637
}

devbox.lock

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,54 @@
653653
"last_modified": "2025-10-31T03:13:32Z",
654654
"resolved": "github:NixOS/nixpkgs/a7fc11be66bdfb5cdde611ee5ce381c183da8386?lastModified=1761880412&narHash=sha256-QoJjGd4NstnyOG4mm4KXF%2BweBzA2AH%2F7gn1Pmpfcb0A%3D"
655655
},
656+
"go-licenses@1.6.0": {
657+
"last_modified": "2025-10-22T20:59:19Z",
658+
"resolved": "github:NixOS/nixpkgs/01b6809f7f9d1183a2b3e081f0a1e6f8f415cb09#go-licenses",
659+
"source": "devbox-search",
660+
"version": "1.6.0",
661+
"systems": {
662+
"aarch64-darwin": {
663+
"outputs": [
664+
{
665+
"name": "out",
666+
"path": "/nix/store/cqvl7nkak2b4zg1m2jqgnlykz4qfria7-go-licenses-1.6.0",
667+
"default": true
668+
}
669+
],
670+
"store_path": "/nix/store/cqvl7nkak2b4zg1m2jqgnlykz4qfria7-go-licenses-1.6.0"
671+
},
672+
"aarch64-linux": {
673+
"outputs": [
674+
{
675+
"name": "out",
676+
"path": "/nix/store/cz8gp980aiapvj1da8nhn0q502xzywdc-go-licenses-1.6.0",
677+
"default": true
678+
}
679+
],
680+
"store_path": "/nix/store/cz8gp980aiapvj1da8nhn0q502xzywdc-go-licenses-1.6.0"
681+
},
682+
"x86_64-darwin": {
683+
"outputs": [
684+
{
685+
"name": "out",
686+
"path": "/nix/store/wf432dmyklk4yyxg0cgzrwcar33sp16m-go-licenses-1.6.0",
687+
"default": true
688+
}
689+
],
690+
"store_path": "/nix/store/wf432dmyklk4yyxg0cgzrwcar33sp16m-go-licenses-1.6.0"
691+
},
692+
"x86_64-linux": {
693+
"outputs": [
694+
{
695+
"name": "out",
696+
"path": "/nix/store/gk8cnvhy4psyn47rbd77bdznj9dm8vc9-go-licenses-1.6.0",
697+
"default": true
698+
}
699+
],
700+
"store_path": "/nix/store/gk8cnvhy4psyn47rbd77bdznj9dm8vc9-go-licenses-1.6.0"
701+
}
702+
}
703+
},
656704
"golangci-lint@2": {
657705
"last_modified": "2025-10-07T08:41:47Z",
658706
"resolved": "github:NixOS/nixpkgs/bce5fe2bb998488d8e7e7856315f90496723793c#golangci-lint",

0 commit comments

Comments
 (0)