|
|
@@ -37,9 +37,9 @@ endif |
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(OS), Windows_NT) |
|
|
|
EXECUTABLE ?= gitea.exe |
|
|
|
EXECUTABLE ?= opendata.exe |
|
|
|
else |
|
|
|
EXECUTABLE ?= gitea |
|
|
|
EXECUTABLE ?= opendata |
|
|
|
UNAME_S := $(shell uname -s) |
|
|
|
ifeq ($(UNAME_S),Darwin) |
|
|
|
SED_INPLACE := sed -i '' |
|
|
@@ -527,7 +527,7 @@ release-windows: | $(DIST_DIRS) |
|
|
|
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ |
|
|
|
$(GO) get -u src.techknowlogick.com/xgo; \ |
|
|
|
fi |
|
|
|
GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out gitea-$(VERSION) . |
|
|
|
GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'windows/*' -out opendata-$(VERSION) . |
|
|
|
ifeq ($(CI),drone) |
|
|
|
cp /build/* $(DIST)/binaries |
|
|
|
endif |
|
|
@@ -537,7 +537,7 @@ release-linux: | $(DIST_DIRS) |
|
|
|
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ |
|
|
|
$(GO) get -u src.techknowlogick.com/xgo; \ |
|
|
|
fi |
|
|
|
GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/mips64le,linux/mips,linux/mipsle' -out gitea-$(VERSION) . |
|
|
|
GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '-linkmode external -extldflags "-static" $(LDFLAGS)' -targets 'linux/amd64,linux/386,linux/arm-5,linux/arm-6,linux/arm64,linux/mips64le,linux/mips,linux/mipsle' -out opendata-$(VERSION) . |
|
|
|
ifeq ($(CI),drone) |
|
|
|
cp /build/* $(DIST)/binaries |
|
|
|
endif |
|
|
@@ -547,7 +547,7 @@ release-darwin: | $(DIST_DIRS) |
|
|
|
@hash xgo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \ |
|
|
|
$(GO) get -u src.techknowlogick.com/xgo; \ |
|
|
|
fi |
|
|
|
GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out gitea-$(VERSION) . |
|
|
|
GO111MODULE=off xgo -go $(XGO_VERSION) -dest $(DIST)/binaries -tags 'netgo osusergo $(TAGS)' -ldflags '$(LDFLAGS)' -targets 'darwin/*' -out opendata-$(VERSION) . |
|
|
|
ifeq ($(CI),drone) |
|
|
|
cp /build/* $(DIST)/binaries |
|
|
|
endif |
|
|
@@ -570,7 +570,7 @@ release-compress: | $(DIST_DIRS) |
|
|
|
.PHONY: release-sources |
|
|
|
release-sources: | $(DIST_DIRS) node_modules |
|
|
|
echo $(VERSION) > $(STORED_VERSION_FILE) |
|
|
|
tar --exclude=./$(DIST) --exclude=./.git --exclude=./$(MAKE_EVIDENCE_DIR) --exclude=./node_modules/.cache -czf $(DIST)/release/gitea-src-$(VERSION).tar.gz . |
|
|
|
tar --exclude=./$(DIST) --exclude=./.git --exclude=./$(MAKE_EVIDENCE_DIR) --exclude=./node_modules/.cache -czf $(DIST)/release/opendata-src-$(VERSION).tar.gz . |
|
|
|
rm -f $(STORED_VERSION_FILE) |
|
|
|
|
|
|
|
node_modules: package-lock.json |
|
|
@@ -605,8 +605,8 @@ $(WEBPACK_DEST): $(WEBPACK_SOURCES) $(WEBPACK_CONFIGS) package-lock.json | node_ |
|
|
|
.PHONY: update-translations |
|
|
|
update-translations: |
|
|
|
mkdir -p ./translations |
|
|
|
cd ./translations && curl -L https://crowdin.com/download/project/gitea.zip > gitea.zip && unzip gitea.zip |
|
|
|
rm ./translations/gitea.zip |
|
|
|
cd ./translations && curl -L https://crowdin.com/download/project/opendata.zip > opendata.zip && unzip opendata.zip |
|
|
|
rm ./translations/opendata.zip |
|
|
|
$(SED_INPLACE) -e 's/="/=/g' -e 's/"$$//g' ./translations/*.ini |
|
|
|
$(SED_INPLACE) -e 's/\\"/"/g' ./translations/*.ini |
|
|
|
mv ./translations/*.ini ./options/locale/ |
|
|
|