godot-build-tools/main.go

32 lines
697 B
Go
Raw Normal View History

2023-07-23 08:30:27 +02:00
package main
import (
"github.com/yeslayla/godot-build-tools/internal"
"github.com/yeslayla/godot-build-tools/logging"
2023-11-07 09:45:11 +01:00
"github.com/yeslayla/godot-build-tools/steps"
2023-07-23 08:30:27 +02:00
)
func main() {
logger := logging.NewLogger(&logging.LoggerOptions{})
2023-11-07 09:45:11 +01:00
flags := internal.NewBuildFlags(logger)
flags.Parse()
if flags.DebugLog {
logger = logging.NewLogger(&logging.LoggerOptions{
Debug: true,
})
2023-07-23 08:30:27 +02:00
}
2023-11-07 09:45:11 +01:00
buildConfig := internal.LoadBuildConfig(logger)
2023-07-23 08:30:27 +02:00
2023-11-07 09:45:11 +01:00
var targetOS internal.TargetOS = internal.CurrentTargetOS()
2023-07-23 08:30:27 +02:00
2023-11-07 09:45:11 +01:00
if flags.HasStep("godot-setup") {
steps.GodotSetup(logger, targetOS, buildConfig.Godot.Version, buildConfig.Godot.Release)
} else {
logger.Debugf("Skipping godot-setup step")
2023-07-23 08:30:27 +02:00
}
}