rick / branch-deploy

fast branch deployments with preview diffs
MIT License
1 stars 0 forks source link

Build CLI options processing via README-driven development #2

Closed rick closed 1 year ago

rick commented 1 year ago

how does this thing work?

We have a notion of what we want the CLI script behavior for bd to be; it's basically this:

Usage: bd [options]
    -r, --repo REPO                  Repository passed to 'git clone' command on deployment host [REQUIRED]
    -b, --branch BRANCH              Branch name to deploy [REQUIRED]
        --host HOSTNAME              Target host for remote deployment [REQUIRED, or --local]
    -l, --local                      Deploy to the local host (default: false) [REQUIRED, or --host]
    -p, --path PATH                  Deployment path on target host [REQUIRED]
    -d, --diff                       Return diff output for proposed changes, do not deploy (default: true)
    -c, --confirm                    Confirm deployment -- actually update files (default: false)
    -s, --ssh-options OPTIONS        Flags passed to the 'ssh' command for remote deployment (default: "")
    -t, --temp-path                  Base path for tempdir creation on deployment host (default: OS default)
    -v, --verbose                    Run verbosely

Here we start from this, as documented in the README, to develop the CLI option semantics via README driven development and BDD

the work

rick commented 1 year ago

4