Rewrite go license generator in go (#21078)
This removes the JS dependency in the checks pipeline. JSON output is different because the previous JS did indent the license data differently and a JSON key was changed, but the end result is the same as it gets re-indented by wepack. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net>
This commit is contained in:
parent
8b8bdb30fb
commit
52c2ef7902
6 changed files with 449 additions and 254 deletions
8
Makefile
8
Makefile
|
@ -422,10 +422,10 @@ tidy-check: tidy
|
|||
.PHONY: go-licenses
|
||||
go-licenses: assets/go-licenses.json
|
||||
|
||||
assets/go-licenses.json: go.mod go.sum build/generate-go-licenses.js
|
||||
-$(GO) run $(GO_LICENSES_PACKAGE) save . --force --save_path="$(GO_LICENSE_TMP_DIR)" 2>/dev/null
|
||||
node build/generate-go-licenses.js "$(GO_LICENSE_TMP_DIR)" "$(GO_LICENSE_FILE)"
|
||||
@rm -rf "$(GO_LICENSE_TMP_DIR)"
|
||||
assets/go-licenses.json: go.mod go.sum
|
||||
-$(GO) run $(GO_LICENSES_PACKAGE) save . --force --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null
|
||||
$(GO) run build/generate-go-licenses.go $(GO_LICENSE_TMP_DIR) $(GO_LICENSE_FILE)
|
||||
@rm -rf $(GO_LICENSE_TMP_DIR)
|
||||
|
||||
generate-ini-sqlite:
|
||||
sed -e 's|{{REPO_TEST_DIR}}|${REPO_TEST_DIR}|g' \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue