Skip to content

Conversation

euanh
Copy link
Collaborator

@euanh euanh commented May 1, 2025

Motivation

It is currently only possible to set the destination repository by specifying the mandatory --repository flag. Setting the repository from an environment variable can be more convenient in scripts and in the terminal - the destination repository can be set once and inherited by all further builds in the same shell.

Modifications

  • --repository is no longer a mandatory argument.
  • A new CONTAINERTOOL_REPOSITORY environment variable is used if --repository is not set.

Fixes #100

Result

Either --repository or CONTAINERTOOL_REPOSITORY can be used to define the destination repository. The command line flag takes precedence over the environment variable.

Test Plan

All existing tests continue to pass.

@euanh euanh force-pushed the repository-environment-variable branch 2 times, most recently from 14c35ad to 1d2703d Compare May 2, 2025 09:19
@euanh euanh added kind/enhancement New feature or request semver/minor Adds new public API. labels May 2, 2025
@euanh euanh marked this pull request as ready for review May 2, 2025 12:31
@euanh euanh force-pushed the repository-environment-variable branch from 1d2703d to 19481e8 Compare May 2, 2025 13:20
@euanh euanh merged commit de7bef0 into apple:main May 2, 2025
23 checks passed
@euanh euanh deleted the repository-environment-variable branch May 2, 2025 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement New feature or request semver/minor Adds new public API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

containtertool should accept the repository argument from a configuration file or an environment variable

1 participant