feat: add --no-cache flag to ps:rebuild
The `ps:rebuild` command now accepts `--no-cache` to perform a single uncached build regardless of builder, without persisting any setting for later deploys. The railpack builder now also honors `--no-cache` when set via `docker-options`, and build records are now correctly attributed when flags precede the app name.
This commit is contained in:
27 files changed
+316
-9
No files matched your search
@@ -3,6 +3,7 @@ package ps
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
@@ -26,7 +27,11 @@ func CommandInspect(appName string) error {
|
||||
}
|
||||
|
||||
// CommandRebuild rebuilds an app from source
|
||||
func CommandRebuild(appName string, allApps bool, parallelCount int) error {
|
||||
func CommandRebuild(appName string, allApps bool, parallelCount int, noCache bool) error {
|
||||
if noCache {
|
||||
os.Setenv("DOKKU_BUILD_NO_CACHE", "true")
|
||||
}
|
||||
|
||||
if allApps {
|
||||
return common.RunCommandAgainstAllApps(Rebuild, "rebuild", parallelCount)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user