Open jongio opened 4 months ago
What about git clone
, a codespace or manual donwload? There would be an inconsistency between acquiring templates with azd init
v/s other acquisition methods.
Here's an alternative:
azd-template
azd init
runs, it will check if azd-template
branch exists and if yes, will use that branch instead of main
branchA strategy like this would enable folks to start a codespace from the azd-template branch to use and own the template, or from main
branch to contribute to the template itself (like updating the .azdignore files)
As a template author I do not want to manage two different branches - too much overhead.
We can only control how azd
itself acquires templates. I think this feature would be helpful for template authors that want to exclude files during the azd init
process.
We know if developers manually acquire the template that the azd ignore file will not be processed.
One other idea is that any additional azd init
call on a template after clone will check for the existence of the file and clean any effected files.
Seeing that PR #4146 is closed in favor of PR #4258 and its corresponding issues #1039 #4215. Marking this issue as not planned. Feel free to open if you think otherwise @jongio
@rajeshkamal5050 - This is a different issue. The ones you referenced are "ignore files during packaging". This one is for "ignore files during init". The description of this issue is still a good reference for the desire there.
When a user runs
azd init
it copies all files from the repo. Sometimes we don't want that.The template author may want a CONTRIBUTING.md file in the repo or a file in the .github folder for the template authoring experience. But doesn't want the user to have that file when they are using the template.
Examples of files that we don't want to be copied when initialization a template, but should be in the repo. https://github.com/Azure-Samples/agent-openai-python-prompty/blob/main/CONTRIBUTING.md https://github.com/Azure-Samples/agent-openai-python-prompty/blob/main/CHANGELOG.md https://github.com/Azure-Samples/agent-openai-python-prompty/blob/main/.github/CODE_OF_CONDUCT.md https://github.com/Azure-Samples/agent-openai-python-prompty/blob/main/.github/workflows/azure-dev-validation.yaml
Suggestion:
Add a
.azdignore
file to the root of the repo that contains files/paths that azd should ignore during the init.