Skip to content

Commit

Permalink
Merge branch 'main' into fix-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny authored Mar 26, 2023
2 parents a603731 + ac64c82 commit 25cc669
Show file tree
Hide file tree
Showing 52 changed files with 203 additions and 1,848 deletions.
7 changes: 5 additions & 2 deletions .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ tasks:
make watch-frontend
openMode: split-right
- name: Run docs
before: sudo bash -c "$(grep 'https://github.com/gohugoio/hugo/releases/download' Makefile | tr -d '\')" # install hugo
command: cd docs && make clean update && hugo server -D -F --baseUrl $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0
command: |
gp sync-await setup
cd docs
make clean update
hugo server -D -F --baseUrl $(gp url 1313) --liveReloadPort=443 --appendPort=false --bind=0.0.0.0
openMode: split-right

vscode:
Expand Down
21 changes: 10 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
WEB_DIRS := web_src/js web_src/css

GO_SOURCES := $(wildcard *.go)
Expand Down Expand Up @@ -189,6 +189,7 @@ help:
@echo " - clean delete backend and integration files"
@echo " - clean-all delete backend, frontend and integration files"
@echo " - deps install dependencies"
@echo " - deps-docs install docs dependencies"
@echo " - deps-frontend install frontend dependencies"
@echo " - deps-backend install backend dependencies"
@echo " - deps-tools install tool dependencies"
Expand Down Expand Up @@ -218,7 +219,6 @@ help:
@echo " - tidy run go mod tidy"
@echo " - test[\#TestSpecificName] run unit test"
@echo " - test-sqlite[\#TestSpecificName] run integration test for sqlite"
@echo " - pr#<index> build and start gitea from a PR with integration test data loaded"

.PHONY: go-check
go-check:
Expand Down Expand Up @@ -352,7 +352,7 @@ lint-backend: golangci-lint vet editorconfig-checker

.PHONY: watch
watch:
bash tools/watch.sh
bash build/watch.sh

.PHONY: watch-frontend
watch-frontend: node-check node_modules
Expand Down Expand Up @@ -816,14 +816,17 @@ release-docs: | $(DIST_DIRS) docs
tar -czf $(DIST)/release/gitea-docs-$(VERSION).tar.gz -C ./docs/public .

.PHONY: docs
docs:
docs: deps-docs
cd docs; make trans-copy clean build-offline;

.PHONY: deps-docs
deps-docs:
@hash hugo > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
curl -sL https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_$(HUGO_VERSION)_Linux-64bit.tar.gz | tar zxf - -C /tmp && mv /tmp/hugo /usr/bin/hugo && chmod +x /usr/bin/hugo; \
curl -sL https://github.com/gohugoio/hugo/releases/download/v$(HUGO_VERSION)/hugo_$(HUGO_VERSION)_Linux-64bit.tar.gz | tar zxf - -C /tmp && mkdir -p ~/go/bin && mv /tmp/hugo ~/go/bin/hugo && chmod +x ~/go/bin/hugo; \
fi
cd docs; make trans-copy clean build-offline;

.PHONY: deps
deps: deps-frontend deps-backend deps-tools
deps: deps-frontend deps-backend deps-tools deps-docs

.PHONY: deps-frontend
deps-frontend: node_modules
Expand Down Expand Up @@ -935,10 +938,6 @@ generate-manpage:
@gzip -9 man/man1/gitea.1 && echo man/man1/gitea.1.gz created
@#TODO A small script that formats config-cheat-sheet.en-us.md nicely for use as a config man page

.PHONY: pr\#%
pr\#%: clean-all
$(GO) run contrib/pr/checkout.go $*

.PHONY: golangci-lint
golangci-lint:
$(GO) run $(GOLANGCI_LINT_PACKAGE) run
Expand Down
3 changes: 3 additions & 0 deletions build/backport-locales.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Copyright 2023 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT

//go:build ignore

package main
Expand Down
1 change: 0 additions & 1 deletion build/code-batch-process.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func newFileCollector(fileFilter string, batchSize int) (*fileCollector, error)
"modules",
"routers",
"services",
"tools",
}
co.includePatterns = append(co.includePatterns, regexp.MustCompile(`.*\.go$`))

Expand Down
20 changes: 20 additions & 0 deletions build/test-echo.go
Original file line number Diff line number Diff line change
@@ -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)
}
}
File renamed without changes.
2 changes: 0 additions & 2 deletions contrib/autoboot.sh

This file was deleted.

2 changes: 0 additions & 2 deletions contrib/mysql.sql

This file was deleted.

267 changes: 0 additions & 267 deletions contrib/pr/checkout.go

This file was deleted.

Loading

0 comments on commit 25cc669

Please sign in to comment.