Skip to content

feat: add --dry-run arg#8

Merged
robotrory merged 2 commits into
mainfrom
rory/dry-run-arg
Jun 1, 2026
Merged

feat: add --dry-run arg#8
robotrory merged 2 commits into
mainfrom
rory/dry-run-arg

Conversation

@robotrory

@robotrory robotrory commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Adds a --dry-run arg so that we can test validation without making real network calls.

@robotrory robotrory requested a review from samstarling April 30, 2026 17:46

@samstarling samstarling left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good! One thing to consider is whether we want to split up "global" options from everything else. Now that *CLI gets passed into Run(), BuildPushCmd gets access to things like Auth which ideally it shouldn't need to know anything about.

I think we could solve this by doing something like:

type Globals struct {
    Debug  bool
    JSON   bool
    Quiet  bool
    DryRun bool
}

type CLI struct {
    Globals
    Version kong.VersionFlag
    Auth    AuthCmd  `cmd:""`
    Build   BuildCmd `cmd:""`
}

// Then in main:
kong.Parse(&cli, kong.Vars{...}, kong.Bind(&cli.Globals))

// And in subcommands:
func (c *BuildPushCmd) Run(g *Globals) error { ... }

Not a must-fix by any means, but probably nice to do as we scale the number of commands in here.

@robotrory robotrory merged commit 6369601 into main Jun 1, 2026
7 checks passed
semaloop-release Bot pushed a commit that referenced this pull request Jun 1, 2026
# [1.3.0](v1.2.0...v1.3.0) (2026-06-01)

### Features

* add --dry-run arg ([#8](#8)) ([6369601](6369601))
@semaloop-release

Copy link
Copy Markdown

🎉 This PR is included in version 1.3.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants