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:
Jose Diaz-Gonzalez committed 2026-10-29 14:25:51 -04:00
1 parent 6e9ae25925
commit f3b21babcc
27 files changed
+316 -9

No files matched your search

+1 -1
View File
@@ -19,7 +19,7 @@ Additional commands:`
helpContent = `
ps:inspect <app>, Displays a sanitized version of docker inspect for an app
ps:rebuild [--parallel count] [--all|<app>], Rebuilds an app from source
ps:rebuild [--parallel count] [--no-cache] [--all|<app>], Rebuilds an app from source
ps:report [<app>] [<flag>], Displays a process report for one or more apps
ps:restart [--parallel count] [--all|<app>] [<process-name>], Restart an app
ps:restore [<app>], Start previously running apps e.g. after reboot
+2 -1
View File
@@ -27,9 +27,10 @@ func main() {
args := flag.NewFlagSet("ps:rebuild", flag.ExitOnError)
allApps := args.Bool("all", false, "--all: rebuild all apps")
parallelCount := args.Int("parallel", ps.RunInSerial, "--parallel: number of apps to rebuild in parallel, -1 to match cpu count")
noCache := args.Bool("no-cache", false, "--no-cache: rebuild without using the build cache")
args.Parse(os.Args[2:])
appName := args.Arg(0)
err = ps.CommandRebuild(appName, *allApps, *parallelCount)
err = ps.CommandRebuild(appName, *allApps, *parallelCount, *noCache)
case "report":
args := flag.NewFlagSet("ps:report", flag.ExitOnError)
format := args.String("format", "stdout", "format: [ stdout | json ]")