added deps skip flag

This commit is contained in:
partisan 2024-12-29 00:58:19 +01:00
parent 2bb34d2f5c
commit b876df0d83
2 changed files with 9 additions and 4 deletions

3
.gitignore vendored
View file

@ -5,4 +5,5 @@
/APKINDEX
/APPINDEX
/browser-amd64-nightly-linux.tar.gz
/browser-amd64-nightly-windows.tar.gz
/browser-amd64-nightly-windows.tar.gz
/sourceforge_config.json

10
main.go
View file

@ -42,6 +42,7 @@ var (
packageName = "spitfire-browser"
maintainer = "Internet Addict"
initialDir string
skipDeps bool
)
func init() {
@ -64,6 +65,7 @@ func init() {
flag.BoolVar(&run, "r", false, "Run the project after build")
flag.BoolVar(&upload, "upload", false, "Upload the compressed build file to SourceForge")
flag.StringVar(&uploadPath, "upload-path", "", "Path to the file to upload if no build present")
flag.BoolVar(&skipDeps, "skip-deps", false, "Skip checking for required system dependencies")
flag.Bool("h", false, "Display help message")
}
@ -113,9 +115,11 @@ func main() {
printHelp()
}
// Check system dependencies
if err := checkDependencies(); err != nil {
log.Fatalf("System check failed: %v", err)
// Only check dependencies if NOT skipping them
if !skipDeps {
if err := checkDependencies(); err != nil {
log.Fatalf("System check failed: %v", err)
}
}
// Set version to current date if it's empty and release is nightly