Makefile + gitignore

This commit is contained in:
fnetx 2022-12-14 19:56:57 +01:00 committed by Loïc Dachary
parent d7d02ae6fb
commit 427852bac0
Signed by untrusted user: dachary
GPG key ID: 992D23B392F9E4F2
2 changed files with 9 additions and 8 deletions

3
.gitignore vendored
View file

@ -112,3 +112,6 @@ prime/
# Manpage # Manpage
/man /man
# Generated merged Forgejo+Gitea language files
/options/locale/locale_*

View file

@ -739,10 +739,14 @@ generate: generate-backend
generate-backend: $(TAGS_PREREQ) generate-go generate-backend: $(TAGS_PREREQ) generate-go
.PHONY: generate-go .PHONY: generate-go
generate-go: $(TAGS_PREREQ) generate-go: $(TAGS_PREREQ) merge-locales
@echo "Running go generate..." @echo "Running go generate..."
@CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' $(GO_PACKAGES) @CC= GOOS= GOARCH= $(GO) generate -tags '$(TAGS)' $(GO_PACKAGES)
.PHONY: merge-locales
merge-locales:
$(GO) run build/merge-forgejo-locales.go
.PHONY: security-check .PHONY: security-check
security-check: security-check:
go run $(GOVULNCHECK_PACKAGE) -v ./... go run $(GOVULNCHECK_PACKAGE) -v ./...
@ -892,13 +896,7 @@ lockfile-check:
.PHONY: update-translations .PHONY: update-translations
update-translations: update-translations:
mkdir -p ./translations # noop to detect merge conflicts (potentially needs updating the scripts) and avoid breaking with Gitea
cd ./translations && curl -L https://crowdin.com/download/project/gitea.zip > gitea.zip && unzip gitea.zip
rm ./translations/gitea.zip
$(SED_INPLACE) -e 's/="/=/g' -e 's/"$$//g' ./translations/*.ini
$(SED_INPLACE) -e 's/\\"/"/g' ./translations/*.ini
mv ./translations/*.ini ./options/locale/
rmdir ./translations
.PHONY: generate-license .PHONY: generate-license
generate-license: generate-license: