aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-03-26 04:22:51 +0800
committerGitHub <noreply@github.com>2023-03-25 16:22:51 -0400
commit5b5f7b756bfca7627b5d1326bf7fe8ef13667b7a (patch)
treea26365636e55f2aca5ea77cc34da1459d1acf70d /build
parent73b4010fcd93e921b626a6f51de7a148de276283 (diff)
downloadgitea-5b5f7b756bfca7627b5d1326bf7fe8ef13667b7a.tar.gz
gitea-5b5f7b756bfca7627b5d1326bf7fe8ef13667b7a.zip
Clean some legacy files and move some build files (#23699)
* Clean the "tools" directory. The "tools" directory contains only two files, move them. * The "external_renderer.go" works like "cat" command to echo Stdin to Stdout , to help testing. * The `// gobuild: external_renderer` is incorrect, there should be no space: `//gobuild: external_renderer` * The `fmt.Print(os.Args[1])` is not a well-defined behavior, and it's never used. * The "watch.sh" is for "make watch", it's somewhat related to "build" * After this PR, there is no "tools" directory, the project root directory looks slightly simpler than before. * Remove the legacy "contrib/autoboot.sh", there is no "gogs_supervisord.sh" * Remove the legacy "contrib/mysql.sql", it's never mentioned anywhere. * Remove the legacy "contrib/pr/checkout.go", it has been broken for long time, and it introduces unnecessary dependencies of the main code base.
Diffstat (limited to 'build')
-rw-r--r--build/backport-locales.go3
-rw-r--r--build/code-batch-process.go1
-rw-r--r--build/test-echo.go20
-rw-r--r--build/watch.sh8
4 files changed, 31 insertions, 1 deletions
diff --git a/build/backport-locales.go b/build/backport-locales.go
index efaae52bd4..9421b6925e 100644
--- a/build/backport-locales.go
+++ b/build/backport-locales.go
@@ -1,3 +1,6 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
//go:build ignore
package main
diff --git a/build/code-batch-process.go b/build/code-batch-process.go
index 9cc47442b2..8556c27ad7 100644
--- a/build/code-batch-process.go
+++ b/build/code-batch-process.go
@@ -65,7 +65,6 @@ func newFileCollector(fileFilter string, batchSize int) (*fileCollector, error)
"modules",
"routers",
"services",
- "tools",
}
co.includePatterns = append(co.includePatterns, regexp.MustCompile(`.*\.go$`))
diff --git a/build/test-echo.go b/build/test-echo.go
new file mode 100644
index 0000000000..093364fcf8
--- /dev/null
+++ b/build/test-echo.go
@@ -0,0 +1,20 @@
+// Copyright 2023 The Gitea Authors. All rights reserved.
+// SPDX-License-Identifier: MIT
+
+//go:build ignore
+
+package main
+
+import (
+ "fmt"
+ "io"
+ "os"
+)
+
+func main() {
+ _, err := io.Copy(os.Stdout, os.Stdin)
+ if err != nil {
+ fmt.Fprintf(os.Stderr, "Error: %v", err)
+ os.Exit(1)
+ }
+}
diff --git a/build/watch.sh b/build/watch.sh
new file mode 100644
index 0000000000..61e3dc40a2
--- /dev/null
+++ b/build/watch.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+set -euo pipefail
+
+make watch-frontend &
+make watch-backend &
+
+trap 'kill $(jobs -p)' EXIT
+wait