From 74502e2a1bc3e162380caef50db4d599fd9346cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Olav=20R=C3=B8nnestad=20Birkeland?= <6450056+o-l-a-v@users.noreply.github.com> Date: Mon, 10 Jun 2024 20:46:23 +0200 Subject: [PATCH] RootCommand.cs: Added info about missing option `--outdir`. (#14188) Added info about missing option `--outdir`. This works in my testing ( #14186 ), but was not outputted when doing `bicep --help`. # Contributing a Pull Request If you haven't already, read the full [contribution guide](https://github.com/Azure/bicep/blob/main/CONTRIBUTING.md). The guide may have changed since the last time you read it, so please double-check. Once you are done and ready to submit your PR, run through the relevant checklist below. ## Contributing to documentation * [ ] All documentation contributions should be made directly in the [Bicep documentation on Microsoft Docs](https://docs.microsoft.com/azure/azure-resource-manager/bicep/). ## Contributing an example We are integrating the Bicep examples into the [Azure QuickStart Templates](https://github.com/Azure/azure-quickstart-templates/blob/master/1-CONTRIBUTION-GUIDE/README.md). If you'd like to contribute new example `.bicep` files that showcase abilities of the language, please follow [these instructions](https://github.com/Azure/azure-quickstart-templates/blob/master/1-CONTRIBUTION-GUIDE/README.md) to add them directly there. We can still take bug reports and fixes for the existing examples for the time being. * [ ] This is a bug fix for an existing example * [ ] I have resolved all warnings and errors shown by the Bicep VS Code extension * [ ] I have checked that all tests are passing by running `dotnet test` * [ ] I have consistent casing for all of my identifiers and am using camelCasing unless I have a justification to use another casing style ## Contributing a feature * [ ] I have opened a new issue for the proposal, or commented on an existing one, and ensured that the Bicep maintainers are good with the design of the feature being implemented * [ ] I have included "Fixes #{issue_number}" in the PR description, so GitHub can link to the issue and close it when the PR is merged * [ ] I have appropriate test coverage of my new feature ## Contributing a snippet * [ ] I have a snippet that is either a single, generic resource or multi resource that uses [parent-child syntax](https://docs.microsoft.com/azure/azure-resource-manager/bicep/child-resource-name-type) * [ ] I have checked that there is not an equivalent snippet already submitted * [ ] I have used camelCasing unless I have a justification to use another casing style * [ ] I have placeholders values that correspond to their property names (e.g. `dnsPrefix: 'dnsPrefix'`), unless it's a property that MUST be changed or parameterized in order to deploy. In that case, I use 'REQUIRED' e.g. [keyData](./src/Bicep.LangServer/Files/SnippetTemplates/res-aks-cluster.bicep#L26) * [ ] I have my symbolic name as the first tab stop ($1) in the snippet. e.g. [res-aks-cluster.bicep](./src/Bicep.LangServer/Files/SnippetTemplates/res-aks-cluster.bicep) * [ ] I have a resource name property equal to "name" * [ ] If applicable, I have set the `location` property to `location: /*${:location}*/'location'` (not `resourceGroup().location`) where `` is a placeholder id, and added `param location string` to the test's main.bicep file so that the resulting main.combined.bicep file used in the tests compiles without errors * [ ] I have verified that the snippet deploys correctly when used in the context of an actual bicep file e.g. ```bicep resource aksCluster 'Microsoft.ContainerService/managedClusters@2021-03-01' = { name: 'name' ``` --- src/Bicep.Cli/Commands/RootCommand.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Bicep.Cli/Commands/RootCommand.cs b/src/Bicep.Cli/Commands/RootCommand.cs index acdde17bf61..ac743117d47 100644 --- a/src/Bicep.Cli/Commands/RootCommand.cs +++ b/src/Bicep.Cli/Commands/RootCommand.cs @@ -213,14 +213,16 @@ Builds a .json file from a .bicepparam file. Options: --bicep-file Verifies if the specified bicep file path matches the one provided in the params file using declaration - --outfile Saves the param output json as the specified file path. - --stdout Prints the param and bicep json output to stdout. + --outdir Saves the output of building the parameter file only (.bicepparam) as json to the specified directory. + --outfile Saves the output of building the parameter file only (.bicepparam) as json to the specified file path. + --stdout Prints the output of building both the parameter file (.bicepparam) and the template it points to (.bicep) as json to stdout. --no-restore Builds the bicep file (referenced in using declaration) without restoring external modules. --diagnostics-format Sets the format with which diagnostics are displayed. Valid values are ( {string.Join(" | ", Enum.GetNames(typeof(DiagnosticsFormat)))} ). Examples: bicep build-params params.bicepparam bicep build-params params.bicepparam --stdout + bicep build-params params.bicepparam --outdir dir1 bicep build-params params.bicepparam --outfile otherParams.json bicep build-params params.bicepparam --no-restore bicep build-params params.bicepparam --diagnostics-format sarif