-
Notifications
You must be signed in to change notification settings - Fork 774
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
Add --all parameter to bicep build #1285
Comments
Note that on OSX/Linux, you can currently achieve this with: bicep build *.bicep Or: bicep build ./path/to/*.bicep |
@anthony-c-martin ok, cool! I tried that on Windows but couldn't get it to work. |
It's definitely more clunky on Windows - if using PowerShell you can do something like: Get-ChildItem -Filter *.bicep | foreach { bicep build $_.FullName } Or Get-ChildItem -Path ./module/path -Filter *.bicep | foreach { bicep build $_.FullName } |
I personally like this workaround that I was taught today. Just run this one liner first in my terminal: Then I can just run |
Very slick, thanks for sharing! |
Took it one step further and created a Bicep PowerShell Module 😊 |
Awesome! I'll leave this open in case anyone wants to add this to the CLI, but this is a great alternative. |
Tried this on Ubuntu @anthony-c-martin and got this error I ran the following arguments are required: --file/-f
Examples from AI knowledge base:
az bicep build --file {bicep_file}
Build a Bicep file.
az bicep build --file {bicep_file} --stdout
Build a Bicep file and print all output to stdout.
az bicep build --file {bicep_file} --outdir {out_dir}
Build a Bicep file and save the result to the specified directory.
https://aka.ms/cli_ref
Read more about the command in reference docs |
@ugreg my command was for the bicep CLI (not az CLI). Here's how I'd do it with az CLI:
|
Is your feature request related to a problem? Please describe.
When authoring bicep modules I tend to end up with multiple .bicep files in the same folder. It would be nice if I could build all .bicep files in a folder at the same time.
Describe the solution you'd like
I would like to have a
--all
parameter tobicep build
that compiles all .bicep files in the working directory.bicep build --all
- Compiles all .bicep files in the working directory.bicep build --all --path /bicep/modules
- Compiles all .bicep files in the /bicep/modules folder.The text was updated successfully, but these errors were encountered: