You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Enhancement: flag for project level variables #520
This feature addresses the problem that environment variables have to be used for user specified, project level variables.
How does this benefit users of Mage?
Mage user can specify project level variables in a way that is not shell specific, for example mage test -D tests=TestFoo instead of TESTS=TestFoo mage test.
changed the title [-]Enhancement: flag for key/value pairs (properties)[/-][+]Enhancement: flag for project level properties (key/value pairs)[/+]on Mar 2, 2025
changed the title [-]Enhancement: flag for project level properties (key/value pairs)[/-][+]Enhancement: flag for project level variables[/+]on Mar 2, 2025
This would be a nice way to express overrides for any underlying configuration within a mage command. It would also be a nice way to keep the interface of a command the same, but express some other execution context.
For example, let's say I have an imaginary mage namespace for sql that has a command called syncusers that allows me to sync some external data with a user in some relational database. To keep all of the tooling consistent, let's say I also want to leverage syncusers for manual testing during development and scaffolding during test automation. To achieve this, I may want to have a setup where syncusers executes locally by default, but I may provide a -remote option for doing the real deal in CI/CD.
So locally I may just run
mage sql:syncusers dev
But in CI/CD I may run
mage sql:syncusers prod -remote
To add to @thorntonrose's feature and benefits above, it would be nice if the interface for a mage command could match that of the interface for running a normal go binary. It would make it easier for people to port their existing binaries over to mage commands.
Activity
thorntonrose commentedon Mar 2, 2025
I would like to work on this feature.
[-]Enhancement: flag for key/value pairs (properties)[/-][+]Enhancement: flag for project level properties (key/value pairs)[/+][-]Enhancement: flag for project level properties (key/value pairs)[/-][+]Enhancement: flag for project level variables[/+]TwFlem commentedon Apr 11, 2025
This would be a nice way to express overrides for any underlying configuration within a mage command. It would also be a nice way to keep the interface of a command the same, but express some other execution context.
For example, let's say I have an imaginary mage namespace for
sqlthat has a command calledsyncusersthat allows me to sync some external data with a user in some relational database. To keep all of the tooling consistent, let's say I also want to leveragesyncusersfor manual testing during development and scaffolding during test automation. To achieve this, I may want to have a setup wheresyncusersexecutes locally by default, but I may provide a-remoteoption for doing the real deal in CI/CD.So locally I may just run
But in CI/CD I may run
To add to @thorntonrose's feature and benefits above, it would be nice if the interface for a mage command could match that of the interface for running a normal go binary. It would make it easier for people to port their existing binaries over to mage commands.