Browse Source

Remove explicit 'generate' calls, fix release task (#9288)

* Remove more explicit 'generate' calls

`generate` is now implicit during `build` since #9114, it is no longer
necessary or desired to specify it explicitely.

* add js,css,generate dependencies to release task

* remove generate warning as per @lunny
tags/v1.11.0-rc1
silverwind 4 years ago
parent
commit
3f42934b9a

+ 0
- 3
.drone.yml View File

commands: commands:
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs - curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
- make clean - make clean
- make generate
- make golangci-lint - make golangci-lint
- make revive - make revive
- make swagger-check - make swagger-check
image: techknowlogick/xgo:latest image: techknowlogick/xgo:latest
commands: commands:
- export PATH=$PATH:$GOPATH/bin - export PATH=$PATH:$GOPATH/bin
- make generate
- make release - make release
environment: environment:
GOPROXY: off GOPROXY: off
image: techknowlogick/xgo:latest image: techknowlogick/xgo:latest
commands: commands:
- export PATH=$PATH:$GOPATH/bin - export PATH=$PATH:$GOPATH/bin
- make generate
- make release - make release
environment: environment:
GOPROXY: off GOPROXY: off

+ 1
- 1
Makefile View File

GO111MODULE=on $(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@ GO111MODULE=on $(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@


.PHONY: release .PHONY: release
release: release-dirs release-windows release-linux release-darwin release-copy release-compress release-check
release: js css generate release-dirs release-windows release-linux release-darwin release-copy release-compress release-check


.PHONY: release-dirs .PHONY: release-dirs
release-dirs: release-dirs:

+ 1
- 1
README.md View File



From the root of the source tree, run: From the root of the source tree, run:


TAGS="bindata" make generate all
TAGS="bindata" make build


More info: https://docs.gitea.io/en-us/install-from-source/ More info: https://docs.gitea.io/en-us/install-from-source/



+ 0
- 2
docs/content/doc/installation/from-source.en-us.md View File

TAGS="bindata" make build TAGS="bindata" make build
``` ```


WARNING: `generate` method is deprecated and using it may cause build to miss some static files.

In the default release build of our continuous integration system, the build In the default release build of our continuous integration system, the build
tags are: `TAGS="bindata sqlite sqlite_unlock_notify"`. The simplest tags are: `TAGS="bindata sqlite sqlite_unlock_notify"`. The simplest
recommended way to build from source is therefore: recommended way to build from source is therefore:

+ 2
- 2
docs/content/doc/installation/from-source.fr-fr.md View File

* `sqlite sqlite_unlock_notify`: Active la prise en charge d'une base de données [SQLite3](https://sqlite.org/), ceci n'est recommandé que pour les petites installations de Gitea. * `sqlite sqlite_unlock_notify`: Active la prise en charge d'une base de données [SQLite3](https://sqlite.org/), ceci n'est recommandé que pour les petites installations de Gitea.
* `pam`: Active la prise en charge de PAM (mLinux Pluggable Authentication Modules), très utile si vos utilisateurs doivent être authentifiés avec les comptes du système. * `pam`: Active la prise en charge de PAM (mLinux Pluggable Authentication Modules), très utile si vos utilisateurs doivent être authentifiés avec les comptes du système.


Il est temps de compiler le binaire, nous suggérons d'intégrer les ressources avec l'option de compilation `bindata`. Pour inclure les ressources, vous devrez également exécuter la tâche Make `generate`. Dans le cas échéant, les ressources ne pourront pas être intégrées:
Il est temps de compiler le binaire, nous suggérons d'intégrer les ressources avec l'option de compilation `bindata`:


``` ```
TAGS="bindata" make generate build
TAGS="bindata" make build
``` ```


## Test ## Test

+ 0
- 2
docs/content/doc/installation/from-source.zh-cn.md View File

TAGS="bindata" make build TAGS="bindata" make build
``` ```


警告: `generate` 已经废弃,使用 `generate` 会导致资源文件打包失败。

默认的发布版本中的编译选项是: `TAGS="bindata sqlite sqlite_unlock_notify"`。以下为推荐的编译方式: 默认的发布版本中的编译选项是: `TAGS="bindata sqlite sqlite_unlock_notify"`。以下为推荐的编译方式:


```bash ```bash

+ 2
- 2
docs/content/doc/installation/from-source.zh-tw.md View File

* `sqlite sqlite_unlock_notify`: 使用此標籤來啟用 [SQLite3](https://sqlite.org/) 資料庫,建議只有少數人時才使用此模式。 * `sqlite sqlite_unlock_notify`: 使用此標籤來啟用 [SQLite3](https://sqlite.org/) 資料庫,建議只有少數人時才使用此模式。
* `pam`: 使用此標籤來啟用 PAM (Linux Pluggable Authentication Modules) 認證,對於系統使用者來說,此方式最方便了。 * `pam`: 使用此標籤來啟用 PAM (Linux Pluggable Authentication Modules) 認證,對於系統使用者來說,此方式最方便了。


現在您可以開始編譯執行檔了,我們建議使用 `bindata` 編譯選項,使用 `bindata` 選項前,您必須執行 `generate` 任務將所有資源都一起編譯進去,否則相關資源都不會被編譯進執行檔:
現在您可以開始編譯執行檔了,我們建議使用 `bindata` 編譯選項:


``` ```
TAGS="bindata" make generate build
TAGS="bindata" make build
``` ```


**注意**: 因為使用了套件管理工具,我們建議 Go 環境版本為 1.6 或者是更高,這樣不用在 Go 1.5 版本設定全域變數 `GO15VENDOREXPERIMENT`。 **注意**: 因為使用了套件管理工具,我們建議 Go 環境版本為 1.6 或者是更高,這樣不用在 Go 1.5 版本設定全域變數 `GO15VENDOREXPERIMENT`。

+ 1
- 1
snap/snapcraft.yaml View File

export PATH=$SNAPCRAFT_PART_INSTALL/../go/bin/:$SNAPCRAFT_PART_INSTALL/../../go/install/bin:$PATH export PATH=$SNAPCRAFT_PART_INSTALL/../go/bin/:$SNAPCRAFT_PART_INSTALL/../../go/install/bin:$PATH
export GOPATH=$SNAPCRAFT_PART_INSTALL/../go export GOPATH=$SNAPCRAFT_PART_INSTALL/../go
cd $GOPATH/src/code.gitea.io/gitea cd $GOPATH/src/code.gitea.io/gitea
TAGS="bindata sqlite sqlite_unlock_notify pam cert" make generate build
TAGS="bindata sqlite sqlite_unlock_notify pam cert" make build
install: | install: |
# Set Convenience Variables # Set Convenience Variables
src=$SNAPCRAFT_PART_INSTALL/../go/src/code.gitea.io/gitea src=$SNAPCRAFT_PART_INSTALL/../go/src/code.gitea.io/gitea

Loading…
Cancel
Save