diff options
| -rw-r--r-- | USER_GUIDE.md | 2 | ||||
| -rw-r--r-- | cmd/skiff/main.go | 2 | ||||
| -rw-r--r-- | internal/tmpl/post-receive.tmpl | 4 |
3 files changed, 3 insertions, 5 deletions
diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 63d6517..00c0f0e 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -614,7 +614,7 @@ Carried over from the project's own README, plus what testing surfaced: skiff new-app --name <app> --ip <ip> [--port 8080] [--health-path /healthz] [--base-snapshot ready] [--iface vtnet0] -skiff deploy --app <app> --new <sha> [--ref refs/heads/main] [--old <sha>] +skiff deploy --app <app> --new <sha> [--ref refs/heads/main] (normally invoked by the post-receive hook, not by hand) skiff rollback --app <app> --list diff --git a/cmd/skiff/main.go b/cmd/skiff/main.go index cc48c67..52d57c1 100644 --- a/cmd/skiff/main.go +++ b/cmd/skiff/main.go @@ -59,11 +59,9 @@ func main() { func cmdDeploy(args []string) error { fs := flag.NewFlagSet("deploy", flag.ExitOnError) app := fs.String("app", "", "app name") - oldSHA := fs.String("old", "", "old commit sha (unused, kept for hook parity)") newSHA := fs.String("new", "", "new commit sha to deploy") ref := fs.String("ref", "", "ref being pushed, e.g. refs/heads/main") fs.Parse(args) - _ = oldSHA if *app == "" || *newSHA == "" { return fmt.Errorf("--app and --new are required") diff --git a/internal/tmpl/post-receive.tmpl b/internal/tmpl/post-receive.tmpl index b06d46e..3ea56d5 100644 --- a/internal/tmpl/post-receive.tmpl +++ b/internal/tmpl/post-receive.tmpl @@ -1,6 +1,6 @@ #!/bin/sh # Installed by `skiff new-app {{.Name}}`. Do not edit by hand - re-run # new-app (or hand-edit the app name below) if this repo is ever renamed. -while read old new ref; do - skiff deploy --app "{{.Name}}" --old "$old" --new "$new" --ref "$ref" || exit 1 +while read _ new ref; do + skiff deploy --app "{{.Name}}" --new "$new" --ref "$ref" || exit 1 done |
