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

Map/Dictionary in Makefiles #27

Closed
bahmanm opened this issue Aug 15, 2023 · 0 comments · Fixed by #102
Closed

Map/Dictionary in Makefiles #27

bahmanm opened this issue Aug 15, 2023 · 0 comments · Fixed by #102
Assignees
Labels
✅ enhancement New feature or request
Milestone

Comments

@bahmanm
Copy link
Owner

bahmanm commented Aug 15, 2023

It would be useful to have a dictionary to group related variables/values, either statically or dynamically.

For example:

$(call dict.put,DEPLOY,env,prod)
$(call dict.put,DEPLOY,service,accounts)
$(call dict.put,DEPLOY,host,accounts.my-cool-product.com)
$(call dict.put,DEPLOY,gpg-key,992443840122)

$(call dict.put,BUILD,arch,x86_64)
$(call dict.put,BUILD,dir,/tmp/my-app/build)

It can, of course, be provided to work as a target:

define-config : dict.put( DEPLOY,env,prod )
define-config : dict.put( DEPLOY,service,accounts )
define-config : dict.put( DEPLOY,host,accounts.my-cool-product.com )
define-config : dict.put( DEPLOY,gpg-key,992443840122 )

deploy : define-config
deploy : 
	/usr/bin/deploy \
		--env $(call dict.get,DEPLOY,env) \
		--server $(call dict.get,DEPLOY,service) \
		$(call dict.get,DEPLOY,host)
@bahmanm bahmanm added 💡 idea Needs investigation/research and removed needs investigation ✅ enhancement New feature or request labels Aug 24, 2023
@bahmanm bahmanm added the ✅ enhancement New feature or request label Sep 30, 2023
@bahmanm bahmanm added ✅ enhancement New feature or request and removed ✅ enhancement New feature or request labels Oct 22, 2023
@bahmanm bahmanm removed the 💡 idea Needs investigation/research label Feb 3, 2024
@bahmanm bahmanm added this to the 0.8.0 milestone Feb 3, 2024
@bahmanm bahmanm self-assigned this Feb 3, 2024
@bahmanm bahmanm linked a pull request Feb 4, 2024 that will close this issue
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 a pull request may close this issue.

1 participant