mirror of
https://github.com/project-zot/zot.git
synced 2024-12-16 21:56:37 -05:00
fix: update-licenses make target does not use LC_ALL=C locale on some machines (#2023)
Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
parent
3ddfd655ea
commit
16def78d84
1 changed files with 1 additions and 2 deletions
3
Makefile
3
Makefile
|
@ -326,11 +326,10 @@ swagger:
|
|||
|
||||
.PHONY: update-licenses
|
||||
# note: for predictable output of below sort command we use locale LC_ALL=C
|
||||
update-licenses: LC_ALL=C
|
||||
update-licenses: check-linux
|
||||
@echo "Detecting and updating licenses ... please be patient!"
|
||||
go install github.com/google/go-licenses@latest
|
||||
$(shell echo "Module | License URL | License" > THIRD-PARTY-LICENSES.md; echo "---|---|---" >> THIRD-PARTY-LICENSES.md; for i in $$(go list -m all | awk '{print $$1}'); do l=$$(go-licenses csv $$i 2>/dev/null); if [ $$? -ne 0 ]; then continue; fi; echo $$l | tr \, \| | tr ' ' '\n'; done | sort -u >> THIRD-PARTY-LICENSES.md)
|
||||
$(shell echo "Module | License URL | License" > THIRD-PARTY-LICENSES.md; echo "---|---|---" >> THIRD-PARTY-LICENSES.md; for i in $$(go list -m all | awk '{print $$1}'); do l=$$(go-licenses csv $$i 2>/dev/null); if [ $$? -ne 0 ]; then continue; fi; echo $$l | tr \, \| | tr ' ' '\n'; done | LC_ALL=C sort -u >> THIRD-PARTY-LICENSES.md)
|
||||
$(eval UNCOMMITED_FILES = $(shell git status --porcelain | grep -c THIRD-PARTY-LICENSES.md))
|
||||
@if [ $(UNCOMMITED_FILES) != 0 ]; then \
|
||||
echo "THIRD-PARTY-LICENSES.md file needs to be updated";\
|
||||
|
|
Loading…
Reference in a new issue