Browse Source

feat: change build command

run-on-octopus
colorfulberry 1 year ago
parent
commit
6b080e4015
5 changed files with 12 additions and 21 deletions
  1. +2
    -2
      .bra.toml
  2. +1
    -0
      .gitignore
  3. +8
    -8
      Makefile
  4. +0
    -10
      README.md
  5. +1
    -1
      README_EN.md

+ 2
- 2
.bra.toml View File

@@ -1,7 +1,7 @@
[run]
init_cmds = [ # Commands run in start
["make", "backend"],
["./gitea"]
["./opendata"]
]
watch_all = true # Watch all sub-directories
watch_dirs = [
@@ -24,7 +24,7 @@ interrupt_timout = 15 # Time to wait until force kill
graceful_kill = false # Wait for exit and before directly kill
cmds = [ # Commands to run
["make", "backend"],
["./gitea"]
["./opendata"]
]

[sync]


+ 1
- 0
.gitignore View File

@@ -44,6 +44,7 @@ coverage.all
*.log

/gitea
/opendata
/gitea-vet
/debug
/integrations.test


+ 8
- 8
Makefile View File

@@ -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/


+ 0
- 10
README.md View File

@@ -17,13 +17,3 @@
## 目标

OpenData 的首要目标是提供对开源数据的大存储支持和管理。我们采用 Go 作为后端语言,这使我们只要生成一个可执行程序即可。并且他还支持跨平台,支持 Linux, macOS 和 Windows 以及各种架构,除了 x86,amd64,还包括 ARM 和 PowerPC。

## 提示

1. **开始贡献代码之前请确保你已经看过了 [贡献者向导(英文)](CONTRIBUTING.md)**.
2. 所有的安全问题,请私下发送邮件给 **security@gitea.io**。谢谢!
3. 如果你要使用API,请参见 [API 文档](https://godoc.org/code.gitea.io/sdk/gitea).

## 文档

关于如何安装请访问我们的 [文档站](https://docs.gitea.io/zh-cn/),如果没有找到对应的文档,你也可以通过 [Discord - 英文](https://discord.gg/gitea)

+ 1
- 1
README_EN.md View File

@@ -50,7 +50,7 @@ More info: https://docs.gitea.io/en-us/install-from-source/

## Using

./gitea web
./opendata web

NOTE: If you're interested in using our APIs, we have experimental
support with [documentation](https://try.gitea.io/api/swagger).

Loading…
Cancel
Save