github.com/goreleaser/goreleaser@v1.25.1/scripts/gen-nix-licenses.sh (about) 1 #!/usr/bin/env bash 2 set -euo pipefail 3 4 { 5 echo "// AUTO-GENERATED. DO NOT EDIT." 6 echo 7 echo "package nix" 8 echo "var validLicenses = []string {" 9 curl -s https://raw.githubusercontent.com/NixOS/nixpkgs/master/lib/licenses.nix | 10 grep -E '.* = \{' | 11 grep -v default | 12 cut -f1 -d= | 13 awk '{print "\"" $1 "\","}' 14 echo -e "}" 15 } >./internal/pipe/nix/licenses.go 16 17 gofumpt -w ./internal/pipe/nix/licenses.go