Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: add --json flag to status command #1196

Merged
merged 6 commits into from
Nov 23, 2024
Merged

Conversation

ecrousseau
Copy link
Contributor

Adds the option of JSON output to the status command, which would be useful for me, and possibly others.

app/app.go Outdated Show resolved Hide resolved
cmd/status.go Outdated Show resolved Hide resolved
cmd/status.go Outdated Show resolved Hide resolved
cmd/status.go Outdated Show resolved Hide resolved
@abiosoft
Copy link
Owner

Thanks for this :)

@ecrousseau
Copy link
Contributor Author

I've pushed an update that avoids changing the interface, as you suggested. My thinking on using --output json rather than just --json was that it leaves room to add other output formats in the future. Easy to change it to a boolean flag if you'd prefer, though.

@ecrousseau ecrousseau requested a review from abiosoft November 20, 2024 11:49
@abiosoft
Copy link
Owner

My thinking on using --output json rather than just --json was that it leaves room to add other output formats in the future.

Considering that --json is already used for the colima list command, I would prefer sticking to --json for consistency.

@ecrousseau
Copy link
Contributor Author

Ah I did not realise there was an existing pattern - completely agree it should stay consistent!

@ecrousseau ecrousseau changed the title cli: add --output=json flag to status command cli: add --json flag to status command Nov 21, 2024
app/app.go Outdated Show resolved Hide resolved
abiosoft
abiosoft previously approved these changes Nov 21, 2024
@abiosoft
Copy link
Owner

Why is the build not getting triggered 🤔

app/app.go Outdated Show resolved Hide resolved
abiosoft
abiosoft previously approved these changes Nov 23, 2024
cmd/status.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
abiosoft
abiosoft previously approved these changes Nov 23, 2024
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
app/app.go Outdated Show resolved Hide resolved
@abiosoft
Copy link
Owner

Once again, thanks.

@abiosoft abiosoft merged commit ad5102e into abiosoft:main Nov 23, 2024
11 checks passed
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request Dec 21, 2024
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [abiosoft/colima](https://github.com/abiosoft/colima) | patch | `v0.8.0` -> `v0.8.1` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>abiosoft/colima (abiosoft/colima)</summary>

### [`v0.8.1`](https://github.com/abiosoft/colima/releases/tag/v0.8.1)

[Compare Source](abiosoft/colima@v0.8.0...v0.8.1)

#### Highlights

This is an incremental release with bug fixes.

#### Fixes

-   Cleanup of network assets directory on startup. Fixes [#&#8203;1210](abiosoft/colima#1210), [#&#8203;1029](abiosoft/colima#1029), [#&#8203;1212](abiosoft/colima#1212), [#&#8203;1116](abiosoft/colima#1116).
-   Use of primary network adapter as default route when external network address is enabled. Fixes [#&#8203;1214](abiosoft/colima#1214).

#### Other Updates

-   `VZ` is now the default virtual machine type on macOS 13 or newer. Qemu can still be used if specified.
-   Disk image can now be downloaded locally and specified with the `--disk-image` flag for `colima start`.

##### Runtime version bumps

Runtime version can be updated running the `colima update` command.

-   Docker version updated to `27.4.0`
-   Nerdctl version updated to `2.0.2`
-   Incus version updated to `6.8`

#### Commits

-   ci: fix integration tests by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1190
-   build(deps): bump golang.org/x/term from 0.25.0 to 0.26.0 by [@&#8203;dependabot](https://github.com/dependabot) in abiosoft/colima#1189
-   core: update disk images by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1191
-   cli: add --json flag to status command by [@&#8203;ecrousseau](https://github.com/ecrousseau) in abiosoft/colima#1196
-   config: ability to specifying memory in decimal GiB by [@&#8203;qiao-summer](https://github.com/qiao-summer) in abiosoft/colima#1206
-   build(deps): bump golang.org/x/term from 0.26.0 to 0.27.0 by [@&#8203;dependabot](https://github.com/dependabot) in abiosoft/colima#1207
-   net: clear assets directory on startup by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1213
-   net: set route for external address by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1214
-   core: update disk images by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1215
-   vm: add support for custom disk images by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1216
-   config: use vz as default vm type on macOS 13 or newer by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1217
-   ci: clean up by [@&#8203;abiosoft](https://github.com/abiosoft) in abiosoft/colima#1220

#### New Contributors

-   [@&#8203;ecrousseau](https://github.com/ecrousseau) made their first contribution in abiosoft/colima#1196
-   [@&#8203;qiao-summer](https://github.com/qiao-summer) made their first contribution in abiosoft/colima#1206

**Full Changelog**: abiosoft/colima@v0.8.0...v0.8.1

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS43Ny4wIiwidXBkYXRlZEluVmVyIjoiMzkuNzcuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants