added '--full-clean' flag
This commit is contained in:
parent
a21ff16308
commit
993bf58ecd
2 changed files with 22 additions and 15 deletions
8
main.go
8
main.go
|
@ -18,6 +18,7 @@ var (
|
|||
all bool
|
||||
buildFlag bool
|
||||
clean bool
|
||||
fullClean bool
|
||||
update bool
|
||||
prePatch bool
|
||||
postPatch bool
|
||||
|
@ -53,7 +54,8 @@ func init() {
|
|||
flag.StringVar(&platform, "platform", runtime.GOOS, "Platform (default: system platform)")
|
||||
flag.BoolVar(&all, "a", false, "Perform all steps (build, clean, update)")
|
||||
flag.BoolVar(&buildFlag, "b", false, "Build Spitfire")
|
||||
flag.BoolVar(&clean, "clean", false, "Clean build")
|
||||
flag.BoolVar(&clean, "clean", false, "Revert uncommitted changes without removing build artifacts")
|
||||
flag.BoolVar(&fullClean, "full-clean", false, "Perform a full clean by removing all build artifacts (clobber)")
|
||||
flag.BoolVar(&update, "u", false, "Update Mozilla repository")
|
||||
flag.BoolVar(&prePatch, "pre-patch", false, "Apply pre-build patches")
|
||||
flag.BoolVar(&postPatch, "post-patch", false, "Apply post-build patches")
|
||||
|
@ -172,7 +174,7 @@ func BuildProcess() {
|
|||
if all {
|
||||
spitfire.DownloadSource(sourcePath, sourceRepo)
|
||||
spitfire.DiscardChanges(sourcePath)
|
||||
spitfire.CleanBuild(sourcePath)
|
||||
spitfire.CleanBuild(sourcePath, fullClean)
|
||||
spitfire.UpdateRepo(sourcePath)
|
||||
if err := spitfire.ApplyPatches(sourcePath, patchesRepo, "pre-compile-patches", filepath.Join(sourcePath, "patcher"), skipPatchUpdate); err != nil {
|
||||
log.Fatalf("Error during patch application: %v", err)
|
||||
|
@ -204,7 +206,7 @@ func BuildProcess() {
|
|||
}
|
||||
fmt.Println("Spitfire build completed successfully.")
|
||||
} else if clean {
|
||||
spitfire.CleanBuild(sourcePath)
|
||||
spitfire.CleanBuild(sourcePath, fullClean)
|
||||
fmt.Println("Cleaned Firefox build.")
|
||||
} else if update {
|
||||
spitfire.DownloadSource(sourcePath, sourceRepo)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue