diff --git a/.github/workflows/list-credits.yml b/.github/workflows/list-credits.yml new file mode 100644 index 00000000..850b71d5 --- /dev/null +++ b/.github/workflows/list-credits.yml @@ -0,0 +1,40 @@ +name: List Credits + +on: + workflow_dispatch: + push: + paths: + - "go.mod" + +permissions: + contents: write + +jobs: + list-credits: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup go + uses: actions/setup-go@v3 + with: + go-version-file: 'go.mod' + cache: true + + - name: Generate CREDITS file using go-licenses + run: | + go install github.com/google/go-licenses@latest + go-licenses report github.com/Bedrock-OSS/regolith > CREDITS.csv + + - name: Commit the licenses (if there are any changes) + run: | + if $(git diff --quiet --ignore-blank-lines -w); then + echo "No changes to commit" + else + git config user.name github-actions + git config user.email github-actions@github.com + git add . + git commit -m "Generated CREDITS.csv" + git push + fi diff --git a/.goreleaser.yml b/.goreleaser.yml index 62702e9a..5e89f82e 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -99,6 +99,8 @@ changelog: release: extra_files: - glob: "./**/regolith-*.msi" + - glob: "./CREDITS.csv" + - glob: "./LICENSE" #brews: # - tap: diff --git a/CREDITS.csv b/CREDITS.csv new file mode 100644 index 00000000..6641ae4a --- /dev/null +++ b/CREDITS.csv @@ -0,0 +1,54 @@ +cloud.google.com/go/compute/metadata,https://github.com/googleapis/google-cloud-go/blob/compute/v1.5.0/compute/LICENSE,Apache-2.0 +cloud.google.com/go/iam,https://github.com/googleapis/google-cloud-go/blob/iam/v0.3.0/iam/LICENSE,Apache-2.0 +cloud.google.com/go/internal,https://github.com/googleapis/google-cloud-go/blob/v0.100.2/LICENSE,Apache-2.0 +cloud.google.com/go/storage,https://github.com/googleapis/google-cloud-go/blob/storage/v1.21.0/storage/LICENSE,Apache-2.0 +github.com/Bedrock-OSS/go-burrito/burrito,https://github.com/Bedrock-OSS/go-burrito/blob/v1.0.3/LICENSE,MIT +github.com/Bedrock-OSS/regolith,https://github.com/Bedrock-OSS/regolith/blob/HEAD/LICENSE,MIT +github.com/antlr/antlr4/runtime/Go/antlr/v4,https://github.com/antlr/antlr4/blob/aa1f1f12a846/runtime/Go/antlr/v4/LICENSE,BSD-3-Clause +github.com/aws/aws-sdk-go,https://github.com/aws/aws-sdk-go/blob/v1.43.25/LICENSE.txt,Apache-2.0 +github.com/aws/aws-sdk-go/internal/sync/singleflight,https://github.com/aws/aws-sdk-go/blob/v1.43.25/internal/sync/singleflight/LICENSE,BSD-3-Clause +github.com/bgentry/go-netrc/netrc,https://github.com/bgentry/go-netrc/blob/9fd32a8b3d3d/LICENSE,MIT +github.com/fatih/color,https://github.com/fatih/color/blob/v1.13.0/LICENSE.md,MIT +github.com/gammazero/deque,https://github.com/gammazero/deque/blob/v0.2.1/LICENSE,MIT +github.com/golang/groupcache/lru,https://github.com/golang/groupcache/blob/41bb18bfe9da/LICENSE,Apache-2.0 +github.com/golang/protobuf,https://github.com/golang/protobuf/blob/v1.5.2/LICENSE,BSD-3-Clause +github.com/google/go-cmp/cmp,https://github.com/google/go-cmp/blob/v0.5.8/LICENSE,BSD-3-Clause +github.com/google/go-github/v39/github,https://github.com/google/go-github/blob/v39.2.0/LICENSE,BSD-3-Clause +github.com/google/go-querystring/query,https://github.com/google/go-querystring/blob/v1.1.0/LICENSE,BSD-3-Clause +github.com/googleapis/gax-go/v2,https://github.com/googleapis/gax-go/blob/v2.2.0/v2/LICENSE,BSD-3-Clause +github.com/hashicorp/go-cleanhttp,https://github.com/hashicorp/go-cleanhttp/blob/v0.5.2/LICENSE,MPL-2.0 +github.com/hashicorp/go-getter,https://github.com/arikkfir/go-getter/blob/281b7670b734/LICENSE,MPL-2.0 +github.com/hashicorp/go-safetemp,https://github.com/hashicorp/go-safetemp/blob/v1.0.0/LICENSE,MPL-2.0 +github.com/hashicorp/go-version,https://github.com/hashicorp/go-version/blob/v1.4.0/LICENSE,MPL-2.0 +github.com/jmespath/go-jmespath,https://github.com/jmespath/go-jmespath/blob/v0.4.0/LICENSE,Apache-2.0 +github.com/klauspost/compress,https://github.com/klauspost/compress/blob/v1.15.1/LICENSE,Apache-2.0 +github.com/klauspost/compress/internal/snapref,https://github.com/klauspost/compress/blob/v1.15.1/internal/snapref/LICENSE,BSD-3-Clause +github.com/klauspost/compress/zstd/internal/xxhash,https://github.com/klauspost/compress/blob/v1.15.1/zstd/internal/xxhash/LICENSE.txt,MIT +github.com/mattn/go-colorable,https://github.com/mattn/go-colorable/blob/v0.1.13/LICENSE,MIT +github.com/mattn/go-isatty,https://github.com/mattn/go-isatty/blob/v0.0.16/LICENSE,MIT +github.com/mitchellh/go-homedir,https://github.com/mitchellh/go-homedir/blob/v1.1.0/LICENSE,MIT +github.com/mitchellh/go-testing-interface,https://github.com/mitchellh/go-testing-interface/blob/v1.14.1/LICENSE,MIT +github.com/muhammadmuzzammil1998/jsonc,https://github.com/muhammadmuzzammil1998/jsonc/blob/v1.0.0/LICENSE,MIT +github.com/nightlyone/lockfile,https://github.com/nightlyone/lockfile/blob/v1.0.0/LICENSE,MIT +github.com/otiai10/copy,https://github.com/otiai10/copy/blob/v1.7.0/LICENSE,MIT +github.com/spf13/cobra,https://github.com/spf13/cobra/blob/v1.6.1/LICENSE.txt,Apache-2.0 +github.com/spf13/pflag,https://github.com/spf13/pflag/blob/v1.0.5/LICENSE,BSD-3-Clause +github.com/stirante/go-simple-eval,https://github.com/stirante/go-simple-eval/blob/70e7960fa53c/LICENSE,GPL-3.0 +github.com/ulikunitz/xz,https://github.com/ulikunitz/xz/blob/v0.5.10/LICENSE,BSD-3-Clause +go.opencensus.io,https://github.com/census-instrumentation/opencensus-go/blob/v0.23.0/LICENSE,Apache-2.0 +go.uber.org/atomic,https://github.com/uber-go/atomic/blob/v1.9.0/LICENSE.txt,MIT +go.uber.org/multierr,https://github.com/uber-go/multierr/blob/v1.8.0/LICENSE.txt,MIT +go.uber.org/zap,https://github.com/uber-go/zap/blob/v1.23.0/LICENSE.txt,MIT +golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.1.0:LICENSE,BSD-3-Clause +golang.org/x/exp,https://cs.opensource.google/go/x/exp/+/85099219:LICENSE,BSD-3-Clause +golang.org/x/mod/semver,https://cs.opensource.google/go/x/mod/+/v0.6.0:LICENSE,BSD-3-Clause +golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.1.0:LICENSE,BSD-3-Clause +golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/6242fa91:LICENSE,BSD-3-Clause +golang.org/x/sys/unix,https://cs.opensource.google/go/x/sys/+/v0.2.0:LICENSE,BSD-3-Clause +golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.4.0:LICENSE,BSD-3-Clause +golang.org/x/xerrors,https://cs.opensource.google/go/x/xerrors/+/5ec99f83:LICENSE,BSD-3-Clause +google.golang.org/api,https://github.com/googleapis/google-api-go-client/blob/v0.73.0/LICENSE,BSD-3-Clause +google.golang.org/api/internal/third_party/uritemplates,https://github.com/googleapis/google-api-go-client/blob/v0.73.0/internal/third_party/uritemplates/LICENSE,BSD-3-Clause +google.golang.org/genproto/googleapis,https://github.com/googleapis/go-genproto/blob/acbaeb5b85eb/LICENSE,Apache-2.0 +google.golang.org/grpc,https://github.com/grpc/grpc-go/blob/v1.45.0/LICENSE,Apache-2.0 +google.golang.org/protobuf,https://github.com/protocolbuffers/protobuf-go/blob/v1.28.0/LICENSE,BSD-3-Clause diff --git a/go.mod b/go.mod index 19a2d8d5..1fcaba63 100644 --- a/go.mod +++ b/go.mod @@ -7,18 +7,21 @@ require ( github.com/fatih/color v1.13.0 github.com/google/go-github/v39 v39.2.0 github.com/hashicorp/go-getter v1.6.2 + github.com/muhammadmuzzammil1998/jsonc v1.0.0 github.com/nightlyone/lockfile v1.0.0 github.com/otiai10/copy v1.7.0 github.com/spf13/cobra v1.6.1 - github.com/stirante/go-simple-eval v0.0.0-20221118214627-1a818b6aab27 + github.com/stirante/go-simple-eval v0.0.0-20221204175035-70e7960fa53c go.uber.org/zap v1.23.0 golang.org/x/mod v0.6.0 golang.org/x/sys v0.2.0 - muzzammil.xyz/jsonc v1.0.0 ) replace github.com/hashicorp/go-getter => github.com/arikkfir/go-getter v1.6.3-0.20220803164326-281b7670b734 + + + require ( cloud.google.com/go v0.100.2 // indirect cloud.google.com/go/compute v1.5.0 // indirect diff --git a/go.sum b/go.sum index 8fc7c90b..c971b20c 100644 --- a/go.sum +++ b/go.sum @@ -238,6 +238,8 @@ github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrk github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= +github.com/muhammadmuzzammil1998/jsonc v1.0.0 h1:8o5gBQn4ZA3NBA9DlTujCj2a4w0tqWrPVjDwhzkgTIs= +github.com/muhammadmuzzammil1998/jsonc v1.0.0/go.mod h1:saF2fIVw4banK0H4+/EuqfFLpRnoy5S+ECwTOCcRcSU= github.com/nightlyone/lockfile v1.0.0 h1:RHep2cFKK4PonZJDdEl4GmkabuhbsRMgk/k3uAmxBiA= github.com/nightlyone/lockfile v1.0.0/go.mod h1:rywoIealpdNse2r832aiD9jRk8ErCatROs6LzC841CI= github.com/otiai10/copy v1.7.0 h1:hVoPiN+t+7d2nzzwMiDHPSOogsWAStewq3TwU05+clE= @@ -262,6 +264,8 @@ github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stirante/go-simple-eval v0.0.0-20221118214627-1a818b6aab27 h1:oZsfpEQRCWfMnrnggFMsofBSRQSvLdEd/fjXtqlkTWo= github.com/stirante/go-simple-eval v0.0.0-20221118214627-1a818b6aab27/go.mod h1:JfruJmj1nZsxcquTo9FIeIJPfY0+GWvdU2x/OcWCoh4= +github.com/stirante/go-simple-eval v0.0.0-20221204175035-70e7960fa53c h1:dnHSmOSduMw7es9k5vpFg/10GqLnG/Vz0ZYEn2Iby00= +github.com/stirante/go-simple-eval v0.0.0-20221204175035-70e7960fa53c/go.mod h1:JfruJmj1nZsxcquTo9FIeIJPfY0+GWvdU2x/OcWCoh4= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= @@ -727,8 +731,6 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -muzzammil.xyz/jsonc v1.0.0 h1:B6kaT3wHueZ87mPz3q1nFuM1BlL32IG0wcq0/uOsQ18= -muzzammil.xyz/jsonc v1.0.0/go.mod h1:rFv8tUUKe+QLh7v02BhfxXEf4ZHhYD7unR93HL/1Uvo= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= diff --git a/regolith/config_unparsed.go b/regolith/config_unparsed.go index b55c794c..6f496d37 100644 --- a/regolith/config_unparsed.go +++ b/regolith/config_unparsed.go @@ -10,7 +10,7 @@ import ( "github.com/Bedrock-OSS/go-burrito/burrito" - "muzzammil.xyz/jsonc" + "github.com/muhammadmuzzammil1998/jsonc" ) // LoadConfigAsMap loads the config.json file as map[string]interface{} diff --git a/regolith/filter_deno.go b/regolith/filter_deno.go index fb01e34c..a944a7b1 100644 --- a/regolith/filter_deno.go +++ b/regolith/filter_deno.go @@ -57,7 +57,7 @@ func (f *DenoFilter) run(context RunContext) error { err := RunSubProcess( "deno", append([]string{ - "run", + "run", "--allow-all", context.AbsoluteLocation + string(os.PathSeparator) + f.Definition.Script, string(jsonSettings)}, f.Arguments...), diff --git a/wix.json b/wix.json index 6ba5fa37..f80ed5f7 100644 --- a/wix.json +++ b/wix.json @@ -11,6 +11,12 @@ }, { "path": "scripts/regolith-update.ps1" + }, + { + "path": "CREDITS.csv" + }, + { + "path": "LICENSE" } ], "environments": [ @@ -23,4 +29,4 @@ "part": "last" } ] -} \ No newline at end of file +}