Skip to content

fix: add version command and arg#9

Merged
Mcrich23 merged 5 commits intoMcrich23:mainfrom
bassco:add-version
Oct 8, 2025
Merged

fix: add version command and arg#9
Mcrich23 merged 5 commits intoMcrich23:mainfrom
bassco:add-version

Conversation

@bassco
Copy link
Copy Markdown
Contributor

@bassco bassco commented Oct 6, 2025

Closes #8

Adds a version command to the tool.

It would need to be manually updated in Application.swift before release.

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>
@Mcrich23
Copy link
Copy Markdown
Owner

Mcrich23 commented Oct 6, 2025

Hey! Thank you so much for submitting this PR.

I wonder if it would be better to do container-compose --version instead of container-compose version

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>
@bassco
Copy link
Copy Markdown
Contributor Author

bassco commented Oct 6, 2025

--version is free from the Framework.
The version command is how upstream docker exposes the versions. Although they have the same value for both outputs.

 $ ./.build/arm64-apple-macosx/release/Container-Compose version
Container Compose version v0.5.1
$ ./.build/arm64-apple-macosx/release/Container-Compose --version
v0.5.1

$ docker compose version
Docker Compose version v2.23.0-desktop.1
$ docker compose --version
Docker Compose version v2.23.0-desktop.1

I've added a commit to allow for the output to be the same across both invocations.

@bassco
Copy link
Copy Markdown
Contributor Author

bassco commented Oct 6, 2025

I wonder if it would be better to do container-compose --version instead of container-compose version

You get both! 😄

Output is now:

$ ./.build/arm64-apple-macosx/release/Container-Compose version
container-compose version v0.5.1

$ ./.build/arm64-apple-macosx/release/Container-Compose --version
container-compose version v0.5.1

@Mcrich23
Copy link
Copy Markdown
Owner

Mcrich23 commented Oct 6, 2025

Sounds good!

@Mcrich23
Copy link
Copy Markdown
Owner

Mcrich23 commented Oct 6, 2025

I accidentally approved these changes. Please just fix the things i outlined above and then I will merge it

@Mcrich23 Mcrich23 added the enhancement New feature or request label Oct 6, 2025
@AndrewBasson-Makersite
Copy link
Copy Markdown

Not quite following, you only want the --version output and to drop the version command?

@Mcrich23
Copy link
Copy Markdown
Owner

Mcrich23 commented Oct 6, 2025

No both are great. I just want to keep tight access controls. There isn't a reason for the Version command to be accessible outside the module, so we don't need to make it public. Same for the commandName and version variables, but in that case they should be marked as private.

bassco added 2 commits October 7, 2025 08:36
Signed-off-by: Andrew Basson <andrew.basson@gmail.com>
Signed-off-by: Andrew Basson <andrew.basson@gmail.com>
@bassco
Copy link
Copy Markdown
Contributor Author

bassco commented Oct 7, 2025

No both are great. I just want to keep tight access controls. There isn't a reason for the Version command to be accessible outside the module, so we don't need to make it public. Same for the commandName and version variables, but in that case they should be marked as private.

Setting the variables to be private - good call.
Version command changed to internal scope.

@Mcrich23
Copy link
Copy Markdown
Owner

Mcrich23 commented Oct 7, 2025

Thank you so much for your effort. Just a few small nitpicks and then this can get merged.

@Mcrich23
Copy link
Copy Markdown
Owner

Mcrich23 commented Oct 7, 2025

No both are great. I just want to keep tight access controls. There isn't a reason for the Version command to be accessible outside the module, so we don't need to make it public. Same for the commandName and version variables, but in that case they should be marked as private.

Setting the variables to be private - good call.

Version command changed to internal scope.

By default, objects are marked as internal, so we can actually not put an access control on the structure or its properties and it will automatically be internal.

Copy link
Copy Markdown
Owner

@Mcrich23 Mcrich23 left a comment

Choose a reason for hiding this comment

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

Somehow didn't finish the review before, so i'm just doing that

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>
@bassco
Copy link
Copy Markdown
Contributor Author

bassco commented Oct 8, 2025

Somehow didn't finish the review before, so i'm just doing that

yeah, the github ui for the "double-submit" for review comments trips me up from time to time too.
Thanks for the scoping insights.

@Mcrich23
Copy link
Copy Markdown
Owner

Mcrich23 commented Oct 8, 2025

Thank you for taking the time to scope it well.

@Mcrich23 Mcrich23 merged commit 49ed6b6 into Mcrich23:main Oct 8, 2025
explicitcontextualunderstanding pushed a commit to explicitcontextualunderstanding/Container-Compose that referenced this pull request Feb 27, 2026
* fix: add version command and arg

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>

* fix: standardise the output of version and --version

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>

* fix: scope version strings

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>

* fix: scope version command to internal

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>

* fix: cleanup more scopes

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>

---------

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>
explicitcontextualunderstanding pushed a commit to explicitcontextualunderstanding/Container-Compose that referenced this pull request Mar 31, 2026
* fix: add version command and arg

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>

* fix: standardise the output of version and --version

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>

* fix: scope version strings

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>

* fix: scope version command to internal

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>

* fix: cleanup more scopes

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>

---------

Signed-off-by: Andrew Basson <andrew.basson@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

version command for the tool

3 participants