Skip to content

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Mar 25, 2023

  • 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.

@wxiaoguang wxiaoguang force-pushed the clean-legacy-file branch 5 times, most recently from 410ec27 to 6dddaea Compare March 25, 2023 10:33
@@ -1,2 +0,0 @@
DROP DATABASE IF EXISTS gitea;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phew, good that apparently no one ever used this script on a production instance 😌

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pity that this file is removed.
On the other hand, I do agree that it's been broken for a long time (I've never been able to run make pr successfully…)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future we can have a new checkout.go, and make it independent of Gitea's modules, then it could work better, and won't affect Gitea's refactoring.

@@ -131,7 +131,7 @@ TEST_TAGS ?= sqlite sqlite_unlock_notify

TAR_EXCLUDES := .git data indexers queues log node_modules $(EXECUTABLE) $(FOMANTIC_WORK_DIR)/node_modules $(DIST) $(MAKE_EVIDENCE_DIR) $(AIR_TMP_DIR) $(GO_LICENSE_TMP_DIR)

GO_DIRS := cmd tests models modules routers build services tools
GO_DIRS := build cmd models modules routers services tests
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for the alphabetic sorting

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 25, 2023
@delvh delvh added type/refactoring Existing code has been cleaned up. There should be no new functionality. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile labels Mar 25, 2023
@delvh delvh added this to the 1.20.0 milestone Mar 25, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Mar 25, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 25, 2023
@jolheiser jolheiser enabled auto-merge (squash) March 25, 2023 19:39
@jolheiser
Copy link
Member

🎺 🤖

@jolheiser jolheiser merged commit 5b5f7b7 into go-gitea:main Mar 25, 2023
@wxiaoguang wxiaoguang deleted the clean-legacy-file branch March 26, 2023 06:03
@lunny lunny removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Mar 26, 2023
zjjhot added a commit to zjjhot/gitea that referenced this pull request Mar 27, 2023
* upstream/main: (23 commits)
  Fix project card preview select and template select (go-gitea#23684)
  [skip ci] Updated translations via Crowdin
  Add git dashes separator to some "log" and "diff" commands (go-gitea#23606)
  Add Simplified Chinese translate for oauth2-provider (go-gitea#23713)
  Fix incorrect `toggle` buttons (go-gitea#23676)
  Fine tune more downdrop settings, use SVG for labels, improve Repo Topic Edit form (go-gitea#23626)
  Allow new file and edit file preview if it has editable extension (go-gitea#23624)
  [skip ci] Updated translations via Crowdin
  Clean some legacy files and move some build files (go-gitea#23699)
  Remove row clicking from notification table (go-gitea#22695)
  Describe Gitea's purpose more accurately (go-gitea#23698)
  [skip ci] Updated translations via Crowdin
  ensure go/bin path exists when copying hugo bin into it (go-gitea#23692)
  Create commit status when event is `pull_request_sync` (go-gitea#23683)
  Add `deps-docs` command to makefile (go-gitea#23686)
  Fix incorrect package doc link (go-gitea#23679)
  Improve indices for `action` table (go-gitea#23532)
  Clarify that Gitea requires JavaScript (go-gitea#23677)
  Use data-tooltip-content for tippy tooltip (go-gitea#23649)
  Add aria attributes to interactive time tooltips. (go-gitea#23661)
  ...
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/build PR changes how Gitea is built, i.e. regarding Docker or the Makefile type/refactoring Existing code has been cleaned up. There should be no new functionality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants