mirror of
https://github.com/gohugoio/hugo.git
synced 2026-08-24 15:28:54 +00:00
Only support the latest Go version
Which is currently Go 1.26. Closes #14997
This commit is contained in:
@@ -16,7 +16,7 @@ jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
go-version: [1.25.x, 1.26.x]
|
||||
go-version: [1.26.x]
|
||||
os: [ubuntu-latest, windows-latest] # macos disabled for now because of disk space issues.
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
|
||||
@@ -105,7 +105,7 @@ Install Hugo from a [prebuilt binary][], package manager, or package repository.
|
||||
To build Hugo from source you must install:
|
||||
|
||||
1. [Git][]
|
||||
1. [Go][] version 1.25.0 or later
|
||||
1. [Go][] version 1.26.0 or later
|
||||
|
||||
### Standard edition
|
||||
|
||||
|
||||
@@ -367,7 +367,7 @@ func (c *hugoBuilder) newWatcher(pollIntervalStr string, dirList ...string) (*wa
|
||||
case changes := <-c.r.changesFromBuild:
|
||||
unlock, err := h.LockBuild()
|
||||
if err != nil {
|
||||
c.r.logger.Errorln("Failed to acquire a build lock: %s", err)
|
||||
c.r.logger.Errorf("Failed to acquire a build lock: %s", err)
|
||||
return
|
||||
}
|
||||
c.changeDetector.PrepareNew()
|
||||
@@ -387,7 +387,7 @@ func (c *hugoBuilder) newWatcher(pollIntervalStr string, dirList ...string) (*wa
|
||||
case evs := <-watcher.Events:
|
||||
unlock, err := h.LockBuild()
|
||||
if err != nil {
|
||||
c.r.logger.Errorln("Failed to acquire a build lock: %s", err)
|
||||
c.r.logger.Errorf("Failed to acquire a build lock: %s", err)
|
||||
return
|
||||
}
|
||||
c.handleEvents(watcher, staticSyncer, evs, configSet)
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
package hstore
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"sync"
|
||||
"testing"
|
||||
|
||||
@@ -69,9 +68,8 @@ func TestScratchAddSlice(t *testing.T) {
|
||||
sl := scratch.Get("intSlice")
|
||||
expected := []int{1, 2, 3}
|
||||
|
||||
if !reflect.DeepEqual(expected, sl) {
|
||||
t.Errorf("Slice difference, go %q expected %q", sl, expected)
|
||||
}
|
||||
c.Assert(sl, qt.DeepEquals, expected)
|
||||
|
||||
_, err = scratch.Add("intSlice", []int{4, 5})
|
||||
|
||||
c.Assert(err, qt.IsNil)
|
||||
@@ -79,9 +77,7 @@ func TestScratchAddSlice(t *testing.T) {
|
||||
sl = scratch.Get("intSlice")
|
||||
expected = []int{1, 2, 3, 4, 5}
|
||||
|
||||
if !reflect.DeepEqual(expected, sl) {
|
||||
t.Errorf("Slice difference, go %q expected %q", sl, expected)
|
||||
}
|
||||
c.Assert(sl, qt.DeepEquals, expected)
|
||||
}
|
||||
|
||||
// https://github.com/gohugoio/hugo/issues/5275
|
||||
|
||||
@@ -191,4 +191,4 @@ require (
|
||||
software.sslmate.com/src/go-pkcs12 v0.7.0 // indirect
|
||||
)
|
||||
|
||||
go 1.25.0
|
||||
go 1.26.0
|
||||
|
||||
@@ -248,7 +248,7 @@ func DecodeConfig(in map[string]any) (*config.ConfigNamespace[ImagingConfig, Ima
|
||||
if i.Imaging.Anchor != "" {
|
||||
anchor, found := anchorPositions[i.Imaging.Anchor]
|
||||
if !found {
|
||||
return i, nil, fmt.Errorf("invalid anchor value %q in imaging config", i.Anchor)
|
||||
return i, nil, fmt.Errorf("invalid anchor value %q in imaging config", i.Imaging.Anchor)
|
||||
}
|
||||
i.Anchor = anchor
|
||||
}
|
||||
@@ -484,14 +484,14 @@ func (i *ImagingConfigInternal) Compile(externalCfg *ImagingConfig) error {
|
||||
if externalCfg.Anchor != "" {
|
||||
anchor, found := anchorPositions[externalCfg.Anchor]
|
||||
if !found {
|
||||
return fmt.Errorf("invalid anchor value %q in imaging config", i.Anchor)
|
||||
return fmt.Errorf("invalid anchor value %q in imaging config", externalCfg.Anchor)
|
||||
}
|
||||
i.Anchor = anchor
|
||||
}
|
||||
|
||||
filter, found := imageFilters[externalCfg.ResampleFilter]
|
||||
if !found {
|
||||
return fmt.Errorf("%q is not a valid resample filter", filter)
|
||||
return fmt.Errorf("%q is not a valid resample filter", externalCfg.ResampleFilter)
|
||||
}
|
||||
i.ResampleFilter = filter
|
||||
|
||||
|
||||
Reference in New Issue
Block a user