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.
This commit is contained in:
parent
73b4010fcd
commit
5b5f7b756b
10 changed files with 26 additions and 303 deletions
|
@ -1,3 +1,6 @@
|
|||
// Copyright 2023 The Gitea Authors. All rights reserved.
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
//go:build ignore
|
||||
|
||||
package main
|
||||
|
|
|
@ -65,7 +65,6 @@ func newFileCollector(fileFilter string, batchSize int) (*fileCollector, error)
|
|||
"modules",
|
||||
"routers",
|
||||
"services",
|
||||
"tools",
|
||||
}
|
||||
co.includePatterns = append(co.includePatterns, regexp.MustCompile(`.*\.go$`))
|
||||
|
||||
|
|
20
build/test-echo.go
Normal file
20
build/test-echo.go
Normal file
|
@ -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)
|
||||
}
|
||||
}
|
8
build/watch.sh
Normal file
8
build/watch.sh
Normal file
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
make watch-frontend &
|
||||
make watch-backend &
|
||||
|
||||
trap 'kill $(jobs -p)' EXIT
|
||||
wait
|
Loading…
Add table
Add a link
Reference in a new issue