mirror of
https://github.com/goreleaser/goreleaser.git
synced 2024-12-29 01:44:39 +02:00
dda1c708ae
this will check if the license provided by the user is a valid one. valid list of licenses is generated from nix's source code. closes #4496
18 lines
409 B
Bash
Executable File
18 lines
409 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
{
|
|
echo "// AUTO-GENERATED. DO NOT EDIT."
|
|
echo
|
|
echo "package nix"
|
|
echo "var validLicenses = []string {"
|
|
curl -s https://raw.githubusercontent.com/NixOS/nixpkgs/master/lib/licenses.nix |
|
|
grep -E '.* = \{' |
|
|
grep -v default |
|
|
cut -f1 -d= |
|
|
awk '{print "\"" $1 "\","}'
|
|
echo -e "}"
|
|
} >./internal/pipe/nix/licenses.go
|
|
|
|
gofumpt -w ./internal/pipe/nix/licenses.go
|