mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-01-14 23:16:29 +03:00
Merge pull request 'build: relax required go version for local development' (#6136) from viceice/forgejo:ci/go-version into forgejo
Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6136 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org> Reviewed-by: Gusted <gusted@noreply.codeberg.org>
This commit is contained in:
commit
f9b1de2e7d
3 changed files with 15 additions and 3 deletions
|
@ -13,3 +13,13 @@ runs:
|
||||||
- uses: https://codeberg.org/fnetx/setup-cache-go@4b50dd28b1068fa06d433c5fabed3f6f4d4ccddf
|
- uses: https://codeberg.org/fnetx/setup-cache-go@4b50dd28b1068fa06d433c5fabed3f6f4d4ccddf
|
||||||
with:
|
with:
|
||||||
username: forgejo
|
username: forgejo
|
||||||
|
|
||||||
|
- name: validate go version
|
||||||
|
run: |
|
||||||
|
set -ex
|
||||||
|
toolchain=$(grep -oP '(?<=toolchain ).+' go.mod)
|
||||||
|
version=$(go version | cut -d' ' -f3)
|
||||||
|
if [ "$toolchain" != "$version" ]; then
|
||||||
|
echo "go version mismatch: $toolchain <> $version"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -18,7 +18,7 @@ DIST := dist
|
||||||
DIST_DIRS := $(DIST)/binaries $(DIST)/release
|
DIST_DIRS := $(DIST)/binaries $(DIST)/release
|
||||||
IMPORT := code.gitea.io/gitea
|
IMPORT := code.gitea.io/gitea
|
||||||
|
|
||||||
GO ?= go
|
GO ?= $(shell go env GOROOT)/bin/go
|
||||||
SHASUM ?= shasum -a 256
|
SHASUM ?= shasum -a 256
|
||||||
HAS_GO := $(shell hash $(GO) > /dev/null 2>&1 && echo yes)
|
HAS_GO := $(shell hash $(GO) > /dev/null 2>&1 && echo yes)
|
||||||
COMMA := ,
|
COMMA := ,
|
||||||
|
@ -620,7 +620,7 @@ tidy-check: tidy
|
||||||
go-licenses: $(GO_LICENSE_FILE)
|
go-licenses: $(GO_LICENSE_FILE)
|
||||||
|
|
||||||
$(GO_LICENSE_FILE): go.mod go.sum
|
$(GO_LICENSE_FILE): go.mod go.sum
|
||||||
-$(shell $(GO) env GOROOT)/bin/go run $(GO_LICENSES_PACKAGE) save . --force --ignore code.gitea.io/gitea --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null
|
-$(GO) run $(GO_LICENSES_PACKAGE) save . --force --ignore code.gitea.io/gitea --save_path=$(GO_LICENSE_TMP_DIR) 2>/dev/null
|
||||||
$(GO) run build/generate-go-licenses.go $(GO_LICENSE_TMP_DIR) $(GO_LICENSE_FILE)
|
$(GO) run build/generate-go-licenses.go $(GO_LICENSE_TMP_DIR) $(GO_LICENSE_FILE)
|
||||||
@rm -rf $(GO_LICENSE_TMP_DIR)
|
@rm -rf $(GO_LICENSE_TMP_DIR)
|
||||||
|
|
||||||
|
|
4
go.mod
4
go.mod
|
@ -1,6 +1,8 @@
|
||||||
module code.gitea.io/gitea
|
module code.gitea.io/gitea
|
||||||
|
|
||||||
go 1.23.3
|
go 1.23.1
|
||||||
|
|
||||||
|
toolchain go1.23.3
|
||||||
|
|
||||||
require (
|
require (
|
||||||
code.forgejo.org/f3/gof3/v3 v3.7.0
|
code.forgejo.org/f3/gof3/v3 v3.7.0
|
||||||
|
|
Loading…
Reference in a new issue