mirror of
https://github.com/project-zot/zot.git
synced 2024-12-30 22:34:13 -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
|
.PHONY: update-licenses
|
||||||
# note: for predictable output of below sort command we use locale LC_ALL=C
|
# note: for predictable output of below sort command we use locale LC_ALL=C
|
||||||
update-licenses: LC_ALL=C
|
|
||||||
update-licenses: check-linux
|
update-licenses: check-linux
|
||||||
@echo "Detecting and updating licenses ... please be patient!"
|
@echo "Detecting and updating licenses ... please be patient!"
|
||||||
go install github.com/google/go-licenses@latest
|
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))
|
$(eval UNCOMMITED_FILES = $(shell git status --porcelain | grep -c THIRD-PARTY-LICENSES.md))
|
||||||
@if [ $(UNCOMMITED_FILES) != 0 ]; then \
|
@if [ $(UNCOMMITED_FILES) != 0 ]; then \
|
||||||
echo "THIRD-PARTY-LICENSES.md file needs to be updated";\
|
echo "THIRD-PARTY-LICENSES.md file needs to be updated";\
|
||||||
|
|
Loading…
Reference in a new issue