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

[ENH] Escaping to shell for commands inside anaconda-project.yml #366

Open
mattkram opened this issue Feb 8, 2022 · 0 comments
Open

[ENH] Escaping to shell for commands inside anaconda-project.yml #366

mattkram opened this issue Feb 8, 2022 · 0 comments
Labels
TRIAGE Uncategorized issue

Comments

@mattkram
Copy link
Contributor

mattkram commented Feb 8, 2022

Background

anaconda-project can potentially serve as a replacement for simple Makefiles. However, make allows for arbitrary shell commands to be embedded within Makefile, which is often used for extracting information such as git tag and branch information.

Example

image := some-image-name
git_hash ?= $(shell git log -1 --pretty=format:%h)

.PHONY: build
build:
	docker build -f Dockerfile  -t $(image):$(git_hash)

Suggestion

Develop some mechanism to embed similar shell commands within anaconda-project.yml, similar to the following:

commands:
  build:
    unix: docker build -f Dockerfile -t $(image):$(shell git log -1 --pretty=format:%h

Potentially, instead of directly embedding within the commands section , this functionality could be moved into the variables section as a new variable type.

@mattkram mattkram added the TRIAGE Uncategorized issue label Feb 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TRIAGE Uncategorized issue
Projects
None yet
Development

No branches or pull requests

1 participant