diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 7f86982d9..a0969e3b7 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -34,7 +34,7 @@ jobs: - name: Install Go uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0 with: - go-version: 1.24.x + go-version: 1.25.x - name: Install Task uses: arduino/setup-task@b91d5d2c96a56797b48ac1e0e89220bf64044611 # v2.0.0 with: @@ -61,7 +61,7 @@ jobs: name: Test strategy: matrix: - go-version: [ 1.24.x ] + go-version: [ 1.25.x ] platform: [ ubuntu-latest, macos-latest ] runs-on: ${{ matrix.platform }} steps: @@ -101,7 +101,7 @@ jobs: name: Test Windows strategy: matrix: - go-version: [ 1.24.x ] + go-version: [ 1.25.x ] platform: [ windows-latest ] runs-on: ${{ matrix.platform }} steps: @@ -139,7 +139,7 @@ jobs: name: Postgres strategy: matrix: - go-version: [ 1.24.x ] + go-version: [ 1.25.x ] platform: [ ubuntu-latest ] runs-on: ${{ matrix.platform }} services: @@ -175,7 +175,7 @@ jobs: name: MySQL strategy: matrix: - go-version: [ 1.24.x ] + go-version: [ 1.25.x ] platform: [ ubuntu-22.04 ] # Use the lowest version possible for backwards compatibility runs-on: ${{ matrix.platform }} steps: @@ -200,7 +200,7 @@ jobs: name: SQLite - Go strategy: matrix: - go-version: [ 1.24.x ] + go-version: [ 1.25.x ] platform: [ ubuntu-latest ] runs-on: ${{ matrix.platform }} steps: diff --git a/CHANGELOG.md b/CHANGELOG.md index 44b0197d2..f20ca97f6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ All notable changes to Gogs are documented in this file. ### Changed -- The required Go version to compile source code changed to 1.24. +- The required Go version to compile source code changed to 1.25. - The build tag `cert` has been removed, and the `gogs cert` subcommand is now always available. [#7883](https://github.com/gogs/gogs/pull/7883) - Updated Mermaid JS to 11.9.0. [#8009](https://github.com/gogs/gogs/pull/8009) diff --git a/go.mod b/go.mod index 2b7f76688..cddbf0c18 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module gogs.io/gogs -go 1.24.0 +go 1.25.0 require ( github.com/Masterminds/semver/v3 v3.4.0 - github.com/derision-test/go-mockgen v1.3.7 + github.com/derision-test/go-mockgen/v2 v2.1.1 github.com/editorconfig/editorconfig-core-go/v2 v2.6.3 github.com/go-ldap/ldap/v3 v3.4.11 github.com/go-macaron/binding v1.2.0 @@ -135,5 +135,5 @@ require ( modernc.org/memory v1.11.0 // indirect ) -// +heroku goVersion go1.24 +// +heroku goVersion go1.25 // +heroku install ./ diff --git a/go.sum b/go.sum index 629742fa2..4a5b64fb7 100644 --- a/go.sum +++ b/go.sum @@ -56,8 +56,8 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs github.com/denisenkom/go-mssqldb v0.0.0-20190707035753-2be1aa521ff4/go.mod h1:zAg7JM8CkOJ43xKXIj7eRO9kmWm/TW578qo+oDO6tuM= github.com/denisenkom/go-mssqldb v0.12.0 h1:VtrkII767ttSPNRfFekePK3sctr+joXgO58stqQbtUA= github.com/denisenkom/go-mssqldb v0.12.0/go.mod h1:iiK0YP1ZeepvmBQk/QpLEhhTNJgfzrpArPY/aFvc9yU= -github.com/derision-test/go-mockgen v1.3.7 h1:b/DXAXL2FkaRPpnbYK3ODdZzklmJAwox0tkc6yyXx74= -github.com/derision-test/go-mockgen v1.3.7/go.mod h1:/TXUePlhtHmDDCaDAi/a4g6xOHqMDz3Wf0r2NPGskB4= +github.com/derision-test/go-mockgen/v2 v2.1.1 h1:MXG9rzyvsrDBfa1a1GatvHjCrbmEug3hVt0rSOXipCw= +github.com/derision-test/go-mockgen/v2 v2.1.1/go.mod h1:cDK2Y9IF5roTJgugWV23IvlOJsllhDN5zxRDN+g4cZo= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78= github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc= github.com/djherbis/buffer v1.1.0/go.mod h1:VwN8VdFkMY0DCALdY8o00d3IZ6Amz/UNVMWcSaJT44o= diff --git a/internal/database/login_sources_test.go b/internal/database/login_sources_test.go index 2739f1f63..508b674af 100644 --- a/internal/database/login_sources_test.go +++ b/internal/database/login_sources_test.go @@ -9,7 +9,7 @@ import ( "testing" "time" - mockrequire "github.com/derision-test/go-mockgen/testutil/require" + mockrequire "github.com/derision-test/go-mockgen/v2/testutil/require" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" "gorm.io/gorm" diff --git a/internal/database/mocks_gen.go b/internal/database/mocks_gen.go index f6d1f5056..b5827afc7 100644 --- a/internal/database/mocks_gen.go +++ b/internal/database/mocks_gen.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.7; DO NOT EDIT. +// Code generated by go-mockgen 2.1.1; DO NOT EDIT. // // This file was generated by running `go-mockgen` at the root of this repository. // To add additional mocks to this or another package, add a new entry to the diff --git a/internal/database/mocks_test.go b/internal/database/mocks_test.go index 36cda4914..78b6a370d 100644 --- a/internal/database/mocks_test.go +++ b/internal/database/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.7; DO NOT EDIT. +// Code generated by go-mockgen 2.1.1; DO NOT EDIT. // // This file was generated by running `go-mockgen` at the root of this repository. // To add additional mocks to this or another package, add a new entry to the diff --git a/internal/route/lfs/mocks_test.go b/internal/route/lfs/mocks_test.go index eb25f0919..5c593cc89 100644 --- a/internal/route/lfs/mocks_test.go +++ b/internal/route/lfs/mocks_test.go @@ -1,4 +1,4 @@ -// Code generated by go-mockgen 1.3.7; DO NOT EDIT. +// Code generated by go-mockgen 2.1.1; DO NOT EDIT. // // This file was generated by running `go-mockgen` at the root of this repository. // To add additional mocks to this or another package, add a new entry to the diff --git a/gen.go b/mockgen.go similarity index 70% rename from gen.go rename to mockgen.go index deaa7eae8..2c623457b 100644 --- a/gen.go +++ b/mockgen.go @@ -5,4 +5,4 @@ package main //go:generate go install golang.org/x/tools/cmd/goimports@v0.17.0 -//go:generate go run github.com/derision-test/go-mockgen/v2/cmd/go-mockgen@v2.0.1 +//go:generate go run github.com/unknwon/go-mockgen/cmd/go-mockgen@v0.0.0-20251002032800-a9a94b119e3b