fixed '--skip-patch-update' flag
This commit is contained in:
parent
e99e7bf437
commit
504fc59573
2 changed files with 18 additions and 10 deletions
26
main.go
26
main.go
|
@ -186,6 +186,23 @@ func BuildProcess() {
|
||||||
spitfire.RunProject(sourcePath)
|
spitfire.RunProject(sourcePath)
|
||||||
}
|
}
|
||||||
fmt.Println("Spitfire build completed successfully.")
|
fmt.Println("Spitfire build completed successfully.")
|
||||||
|
} else if buildFlag {
|
||||||
|
if prePatch {
|
||||||
|
if err := spitfire.ApplyPatches(sourcePath, patchesRepo, "pre-compile-patches", filepath.Join(sourcePath, "patcher"), skipPatchUpdate); err != nil {
|
||||||
|
log.Fatalf("Error during patch application: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
spitfire.Configure(sourcePath)
|
||||||
|
spitfire.Build(sourcePath)
|
||||||
|
if postPatch {
|
||||||
|
if err := spitfire.ApplyPatches(buildDir, patchesRepo, "post-compile-patches", filepath.Join(sourcePath, "patcher"), skipPatchUpdate); err != nil {
|
||||||
|
log.Fatalf("Error during patch application: %v", err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if run {
|
||||||
|
spitfire.RunProject(sourcePath)
|
||||||
|
}
|
||||||
|
fmt.Println("Spitfire build completed successfully.")
|
||||||
} else if clean {
|
} else if clean {
|
||||||
spitfire.CleanBuild(sourcePath)
|
spitfire.CleanBuild(sourcePath)
|
||||||
fmt.Println("Cleaned Firefox build.")
|
fmt.Println("Cleaned Firefox build.")
|
||||||
|
@ -205,18 +222,9 @@ func BuildProcess() {
|
||||||
log.Fatalf("Error during patch application: %v", err)
|
log.Fatalf("Error during patch application: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if buildFlag {
|
|
||||||
spitfire.Configure(sourcePath)
|
|
||||||
spitfire.Build(sourcePath)
|
|
||||||
if postPatch {
|
|
||||||
if err := spitfire.ApplyPatches(buildDir, patchesRepo, "post-compile-patches", filepath.Join(sourcePath, "patcher"), skipPatchUpdate); err != nil {
|
|
||||||
log.Fatalf("Error during patch application: %v", err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if run {
|
if run {
|
||||||
spitfire.RunProject(sourcePath)
|
spitfire.RunProject(sourcePath)
|
||||||
}
|
}
|
||||||
fmt.Println("Spitfire build completed successfully.")
|
|
||||||
} else if run {
|
} else if run {
|
||||||
spitfire.RunProject(sourcePath)
|
spitfire.RunProject(sourcePath)
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ func ApplyPatches(sourcePath string, patchesRepo string, patchesPath string, pat
|
||||||
}
|
}
|
||||||
fmt.Println("Patches repository cloned successfully.")
|
fmt.Println("Patches repository cloned successfully.")
|
||||||
} else {
|
} else {
|
||||||
if skipUpdateRepo {
|
if !skipUpdateRepo {
|
||||||
// If the directory exists, fetch and pull the latest changes
|
// If the directory exists, fetch and pull the latest changes
|
||||||
fmt.Println("Patches directory already exists. Fetching latest changes.")
|
fmt.Println("Patches directory already exists. Fetching latest changes.")
|
||||||
cmdFetch := exec.Command("git", "fetch", "--all")
|
cmdFetch := exec.Command("git", "fetch", "--all")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue