Skip to content

Commit bf9b510

Browse files
committed
Go 1.27, dependency updates
1 parent 8355556 commit bf9b510

23 files changed

Lines changed: 166 additions & 152 deletions

File tree

‎.devcontainer/devcontainer.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"image": "mcr.microsoft.com/devcontainers/go:2.1.0-1.26-bookworm",
44
"features": {
55
"ghcr.io/devcontainers/features/go:1": {
6-
"version": "1.26"
6+
"version": "1.27"
77
},
88
"ghcr.io/guiyomh/features/golangci-lint:0": {
99
"version": "2.2.2"

‎.github/workflows/lint.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: "Golang"
2121
uses: "actions/setup-go@v5"
2222
with:
23-
go-version: "1.26.0"
23+
go-version: "1.27.0"
2424
- name: checkout
2525
uses: actions/checkout@v4
2626
- name: "Dependencies"

‎.github/workflows/playwright.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
- name: "Golang"
4040
uses: "actions/setup-go@v5"
4141
with:
42-
go-version: "1.26.0"
42+
go-version: "1.27.0"
4343

4444
- name: "Bootstrap"
4545
run: "bin/bootstrap.sh"

‎.github/workflows/release.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: "Golang"
1717
uses: "actions/setup-go@v5"
1818
with:
19-
go-version: "1.26.0"
19+
go-version: "1.27.0"
2020
- name: "Login"
2121
uses: "docker/login-action@dd4fa0671be5250ee6f50aedf4cb05514abda2c7" # v1
2222
with:

‎.github/workflows/test.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: "Golang"
2727
uses: "actions/setup-go@v5"
2828
with:
29-
go-version: "1.26.0"
29+
go-version: "1.27.0"
3030
- name: "Cache"
3131
uses: "actions/cache@v4"
3232
with:

‎app/file/diff/load.go‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ import (
1010

1111
"projectforge.dev/projectforge/app/file"
1212
"projectforge.dev/projectforge/app/lib/filesystem"
13+
"projectforge.dev/projectforge/app/project"
1314
"projectforge.dev/projectforge/app/util"
1415
)
1516

16-
func FileLoader(mods []string, src file.Files, tgt filesystem.FileLoader, ignoredFiles []string, includeUnchanged bool, logger util.Logger) (Diffs, error) {
17+
func FileLoader(mods []string, src file.Files, tgt filesystem.FileLoader, ignoredFiles []string, bld *project.Build, includeUnchanged bool, logger util.Logger) (Diffs, error) {
1718
var ret Diffs
1819
for _, s := range src {
1920
p := s.FullPath()
@@ -36,7 +37,7 @@ func FileLoader(mods []string, src file.Files, tgt filesystem.FileLoader, ignore
3637
}
3738
}
3839

39-
matches, err := matchesModules(s, mods, tgtFile)
40+
matches, err := matchesModules(s, mods, bld, tgtFile)
4041
if err != nil {
4142
return nil, err
4243
}
@@ -57,7 +58,7 @@ func FileLoader(mods []string, src file.Files, tgt filesystem.FileLoader, ignore
5758
return ret, nil
5859
}
5960

60-
func matchesModules(s *file.File, mods []string, tgtFile *file.File) (bool, error) {
61+
func matchesModules(s *file.File, mods []string, bld *project.Build, tgtFile *file.File) (bool, error) {
6162
if idx := strings.Index(s.Content, file.ModulePrefix); idx > 1 {
6263
lines := util.StringSplitLines(s.Content)
6364
line, lineIdx, _ := lo.FindIndexOf(lines, func(line string) bool {
@@ -76,8 +77,15 @@ func matchesModules(s *file.File, mods []string, tgtFile *file.File) (bool, erro
7677

7778
hasAllMods := true
7879
lo.ForEach(tgtMods, func(mod string, _ int) {
79-
if !lo.Contains(mods, mod) {
80-
hasAllMods = false
80+
switch {
81+
case mod == "docker":
82+
if bld.SkipDocker {
83+
hasAllMods = false
84+
}
85+
default:
86+
if !lo.Contains(mods, mod) {
87+
hasAllMods = false
88+
}
8189
}
8290
})
8391
if hasAllMods {

‎app/project/action/diffs.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ func diffs(pm *PrjAndMods) (file.Files, diff.Diffs, error) {
8585
if pm.Prj.Build.Homebrew {
8686
mods = append(mods, "homebrew")
8787
}
88-
dfs, err := diff.FileLoader(mods, srcFiles, pm.FS, pm.Prj.Info.IgnoredFiles, false, pm.Logger)
88+
dfs, err := diff.FileLoader(mods, srcFiles, pm.FS, pm.Prj.Info.IgnoredFiles, pm.Prj.Build, false, pm.Logger)
8989
if err != nil {
9090
return nil, nil, err
9191
}

‎app/project/info.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"projectforge.dev/projectforge/app/util"
99
)
1010

11-
const DefaultGoVersion = "1.26.0"
11+
const DefaultGoVersion = "1.27.0"
1212

1313
type Doc struct {
1414
Name string `json:"name"`

‎app/project/validate.go‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ func validateModuleConfig(p *Project, e validationAddErrFn, dangerous []string)
105105
if p.HasModule("android") && (!p.Build.Android) {
106106
e("android-disabled", "Android module is enabled, but Android build isn't set")
107107
}
108+
hasDB := p.HasModule(util.DatabaseMySQL) || p.HasModule(util.DatabasePostgreSQL) || p.HasModule(util.DatabaseSQLite) || p.HasModule(util.DatabaseSQLServer)
109+
if p.HasModule("migration") && (!hasDB) {
110+
e("no-db-engine", "migration module is enabled, but no database engine is configured")
111+
}
108112
if p.Build != nil && p.Build.SafeMode {
109113
lo.ForEach(dangerous, func(m string, _ int) {
110114
if p.HasModule(m) {

‎doc/module/android.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ The Android build process follows these steps:
7979
## Requirements
8080

8181
### Development Dependencies
82-
- **Go 1.26+** with gomobile support
82+
- **Go 1.27+** with gomobile support
8383
- **Android SDK** with API level 21+
8484
- **Gradle** build system
8585
- **Java Development Kit (JDK) 8+**

0 commit comments

Comments
 (0)