Skip to content

Commit 3f42934

Browse files
silverwindlafriks
authored andcommitted
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
1 parent 95a5739 commit 3f42934

File tree

8 files changed

+7
-14
lines changed

8 files changed

+7
-14
lines changed

.drone.yml

-3
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ steps:
8989
commands:
9090
- curl -sL https://deb.nodesource.com/setup_12.x | bash - && apt -y install nodejs
9191
- make clean
92-
- make generate
9392
- make golangci-lint
9493
- make revive
9594
- make swagger-check
@@ -394,7 +393,6 @@ steps:
394393
image: techknowlogick/xgo:latest
395394
commands:
396395
- export PATH=$PATH:$GOPATH/bin
397-
- make generate
398396
- make release
399397
environment:
400398
GOPROXY: off
@@ -496,7 +494,6 @@ steps:
496494
image: techknowlogick/xgo:latest
497495
commands:
498496
- export PATH=$PATH:$GOPATH/bin
499-
- make generate
500497
- make release
501498
environment:
502499
GOPROXY: off

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ $(EXECUTABLE): $(GO_SOURCES)
397397
GO111MODULE=on $(GO) build -mod=vendor $(GOFLAGS) $(EXTRA_GOFLAGS) -tags '$(TAGS)' -ldflags '-s -w $(LDFLAGS)' -o $@
398398

399399
.PHONY: release
400-
release: release-dirs release-windows release-linux release-darwin release-copy release-compress release-check
400+
release: js css generate release-dirs release-windows release-linux release-darwin release-copy release-compress release-check
401401

402402
.PHONY: release-dirs
403403
release-dirs:

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This project has been
3131

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

34-
TAGS="bindata" make generate all
34+
TAGS="bindata" make build
3535

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

docs/content/doc/installation/from-source.en-us.md

-2
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,6 @@ To include assets, add the `bindata` tag:
106106
TAGS="bindata" make build
107107
```
108108

109-
WARNING: `generate` method is deprecated and using it may cause build to miss some static files.
110-
111109
In the default release build of our continuous integration system, the build
112110
tags are: `TAGS="bindata sqlite sqlite_unlock_notify"`. The simplest
113111
recommended way to build from source is therefore:

docs/content/doc/installation/from-source.fr-fr.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ Comme nous regroupons déjà toutes les bibliothèques requises pour compiler Gi
6060
* `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.
6161
* `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.
6262

63-
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:
63+
Il est temps de compiler le binaire, nous suggérons d'intégrer les ressources avec l'option de compilation `bindata`:
6464

6565
```
66-
TAGS="bindata" make generate build
66+
TAGS="bindata" make build
6767
```
6868

6969
## Test

docs/content/doc/installation/from-source.zh-cn.md

-2
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@ git checkout v{{< version >}}
6666
TAGS="bindata" make build
6767
```
6868

69-
警告: `generate` 已经废弃,使用 `generate` 会导致资源文件打包失败。
70-
7169
默认的发布版本中的编译选项是: `TAGS="bindata sqlite sqlite_unlock_notify"`。以下为推荐的编译方式:
7270

7371
```bash

docs/content/doc/installation/from-source.zh-tw.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ git checkout v{{< version >}}
5050
* `sqlite sqlite_unlock_notify`: 使用此標籤來啟用 [SQLite3](https://sqlite.org/) 資料庫,建議只有少數人時才使用此模式。
5151
* `pam`: 使用此標籤來啟用 PAM (Linux Pluggable Authentication Modules) 認證,對於系統使用者來說,此方式最方便了。
5252

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

5555
```
56-
TAGS="bindata" make generate build
56+
TAGS="bindata" make build
5757
```
5858

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

snap/snapcraft.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ parts:
6666
export PATH=$SNAPCRAFT_PART_INSTALL/../go/bin/:$SNAPCRAFT_PART_INSTALL/../../go/install/bin:$PATH
6767
export GOPATH=$SNAPCRAFT_PART_INSTALL/../go
6868
cd $GOPATH/src/code.gitea.io/gitea
69-
TAGS="bindata sqlite sqlite_unlock_notify pam cert" make generate build
69+
TAGS="bindata sqlite sqlite_unlock_notify pam cert" make build
7070
install: |
7171
# Set Convenience Variables
7272
src=$SNAPCRAFT_PART_INSTALL/../go/src/code.gitea.io/gitea

0 commit comments

Comments
 (0)