moved check option to config

This commit is contained in:
2021-11-21 19:30:48 +01:00
parent 3cfcd90024
commit ca7cbe72ee
2 changed files with 5 additions and 1 deletions

View File

@@ -48,6 +48,7 @@ status:
build: build:
worker: 4 worker: 4
makej: 8 makej: 8
checks: true
logging: logging:
level: INFO level: INFO

View File

@@ -78,6 +78,7 @@ type Conf struct {
Build struct { Build struct {
Worker int Worker int
Makej int Makej int
Checks string
} }
Logging struct { Logging struct {
Level string Level string
@@ -691,7 +692,9 @@ func setupMakepkg(march string) error {
makepkgStr := string(t) makepkgStr := string(t)
makepkgStr = strings.ReplaceAll(makepkgStr, "-mtune=generic", "") makepkgStr = strings.ReplaceAll(makepkgStr, "-mtune=generic", "")
if conf.Build.Checks != "true" {
makepkgStr = strings.ReplaceAll(makepkgStr, " check ", " !check ") makepkgStr = strings.ReplaceAll(makepkgStr, " check ", " !check ")
}
makepkgStr = strings.ReplaceAll(makepkgStr, " color ", " !color ") makepkgStr = strings.ReplaceAll(makepkgStr, " color ", " !color ")
makepkgStr = strings.ReplaceAll(makepkgStr, "-O2", "-O3") makepkgStr = strings.ReplaceAll(makepkgStr, "-O2", "-O3")
makepkgStr = strings.ReplaceAll(makepkgStr, "#MAKEFLAGS=\"-j2\"", "MAKEFLAGS=\"-j"+strconv.Itoa(conf.Build.Makej)+"\"") makepkgStr = strings.ReplaceAll(makepkgStr, "#MAKEFLAGS=\"-j2\"", "MAKEFLAGS=\"-j"+strconv.Itoa(conf.Build.Makej)+"\"")