removed need for '-p' flag
This commit is contained in:
parent
993bf58ecd
commit
bc8a62666b
2 changed files with 25 additions and 6 deletions
14
README.md
14
README.md
|
@ -37,15 +37,21 @@ Below is a detailed description of all the flags supported by the Spitfire Build
|
||||||
### **Build Process Flags**
|
### **Build Process Flags**
|
||||||
|
|
||||||
- **`-a`**:
|
- **`-a`**:
|
||||||
Perform all steps of the build process, including cleaning, updating the repository, building, and applying patches.
|
Perform all steps of the build process, including cleaning, updating the repository, building, and applying patches. (Without uploading)
|
||||||
- **`-b`**:
|
- **`-b`**:
|
||||||
Compiles the source code without cleaning or updating.
|
Compiles the source code without cleaning or updating.
|
||||||
- **`--clean`**:
|
- **`--clean`**:
|
||||||
Cleans the build directory by removing temporary or cached files.
|
Cleans the build directory by removing temporary or cached files.
|
||||||
|
- **`--full-clean`**:
|
||||||
|
Performs a full clean by removing all build artifacts (clobber).
|
||||||
- **`-u`**:
|
- **`-u`**:
|
||||||
Updates the Mozilla source repository to the latest revision using Mercurial (`hg pull`).
|
Updates the Mozilla source repository to the latest revision using Mercurial (`hg pull`).
|
||||||
- **`--patches`**:
|
- **`--pre-patch`**:
|
||||||
Applies custom patches to the source code.
|
Applies pre-build patches to the source code.
|
||||||
|
- **`--post-patch`**:
|
||||||
|
Applies post-build patches to the built output.
|
||||||
|
- **`--skip-patch-update`**:
|
||||||
|
Skips updating the patches repository.
|
||||||
- **`-r`**:
|
- **`-r`**:
|
||||||
Runs the built project after the build process completes successfully.
|
Runs the built project after the build process completes successfully.
|
||||||
|
|
||||||
|
@ -61,7 +67,7 @@ Below is a detailed description of all the flags supported by the Spitfire Build
|
||||||
### **Customization Flags**
|
### **Customization Flags**
|
||||||
|
|
||||||
- **`-p=<path>`**:
|
- **`-p=<path>`**:
|
||||||
Specifies the build directory path. If not provided, the default path is used.
|
Specifies the build directory path for uploads. If not provided, the script dynamically detects the build directory.
|
||||||
- **`-t=<target>`**:
|
- **`-t=<target>`**:
|
||||||
Sets the target format for the build output. The format follows `component-arch-release-platform`.
|
Sets the target format for the build output. The format follows `component-arch-release-platform`.
|
||||||
- **`-v=<version>`**:
|
- **`-v=<version>`**:
|
||||||
|
|
17
main.go
17
main.go
|
@ -130,8 +130,21 @@ func main() {
|
||||||
}
|
}
|
||||||
fmt.Printf("Initial working directory: %s\n", initialDir)
|
fmt.Printf("Initial working directory: %s\n", initialDir)
|
||||||
|
|
||||||
// Convert buildPath and uploadPath to absolute paths
|
// Determine buildPath dynamically if not provided
|
||||||
if buildPath != "" {
|
if buildPath == "" {
|
||||||
|
sourcePath, err := spitfire.ResolvePath("./mozilla-central")
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Error resolving source path: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
resolvedBuildPath, err := spitfire.ResolveBuildDir(sourcePath)
|
||||||
|
if err != nil {
|
||||||
|
log.Fatalf("Failed to detect build directory dynamically: %v", err)
|
||||||
|
}
|
||||||
|
buildPath = resolvedBuildPath
|
||||||
|
fmt.Printf("Automatically detected buildPath: %s\n", buildPath)
|
||||||
|
} else {
|
||||||
|
// Convert buildPath to absolute path
|
||||||
buildPath, err2 = spitfire.ResolvePath(buildPath)
|
buildPath, err2 = spitfire.ResolvePath(buildPath)
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
log.Fatalf("Failed to convert buildPath to absolute path: %v", err2)
|
log.Fatalf("Failed to convert buildPath to absolute path: %v", err2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue