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:
worker: 4
makej: 8
checks: true
logging:
level: INFO

View File

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