Skip to content

Commit 9afa6b3

Browse files
flanakinclaude
andauthored
Update internal PowerShell script documentation (#1993)
Co-authored-by: Claude <noreply@anthropic.com>
1 parent e84efa2 commit 9afa6b3

9 files changed

Lines changed: 73 additions & 37 deletions

‎.github/copilot-instructions.md‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,15 @@ This is the Microsoft FinOps toolkit - an open-source collection of tools and re
1313
- **Test coverage**: Ensure changes don't break existing functionality
1414
- **Microsoft standards**: Follow Microsoft style guide and development practices
1515
- **Document changes**: Always document changes in the [changelog](../docs-mslearn/toolkit/changelog.md)
16-
- **Every change must have a changelog entry** - no exceptions for bug fixes, features, or improvements
16+
- **Every change must have a changelog entry** unless the PR body contains `[x] ❎ Log not needed` and the PR does NOT change any meaningful externally-facing functionality; no exceptions for external bug fixes, features, or improvements
1717
- **Document in the next release section**, not the last release:
1818
- Check the current version in [package.json](../package.json) (e.g., if version is "12.0.0", document changes under v13)
1919
- Remove `-dev` from the version number when determining the next release
2020
- Create the next version section if it doesn't exist yet
2121
- Changelog entries must be under the correct tool and version (e.g., FinOps hubs v13)
2222
- For releases, include download and changelog links at the end of each release section using the format:
2323
```markdown
24-
> [!div class="nextstepaction"]
25-
> [Download](https://github.com/microsoft/finops-toolkit/releases/tag/vX)
26-
> [!div class="nextstepaction"]
27-
> [Full changelog](https://github.com/microsoft/finops-toolkit/compare/vX-1...vX)
24+
> [!div class="nextstepaction"] > [Download](https://github.com/microsoft/finops-toolkit/releases/tag/vX) > [!div class="nextstepaction"] > [Full changelog](https://github.com/microsoft/finops-toolkit/compare/vX-1...vX)
2825
```
2926

3027
### Code style guidelines
@@ -38,7 +35,7 @@ This is the Microsoft FinOps toolkit - an open-source collection of tools and re
3835
## 📁 Repository structure
3936

4037
- `/src/` - Source code for all toolkit components
41-
- `/docs/` - Public website and deployment templates
38+
- `/docs/` - Public website and deployment templates
4239
- `/docs-wiki/` - Developer guidelines and project documentation
4340
- `/docs-mslearn/` - Microsoft Learn documentation content
4441
- `/.github/` - GitHub workflows, templates, and configuration

‎src/scripts/Build-Bicep.ps1‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,11 @@
66
Builds all Bicep modules for publishing to the Bicep Registry.
77
88
.PARAMETER Module
9-
Path to the module to build.
9+
Optional. Name of the module to build. Default = * (all modules).
1010
1111
.PARAMETER Scope
1212
Optional. Scope to build. If not specified, all scopes will be built.
1313
14-
.PARAMETER Debug
15-
Optional. Renders main module and test bicep code to the console instead of generating files. Line numbers map to original file.
16-
1714
.EXAMPLE
1815
./Build-Bicep module-name
1916
@@ -29,6 +26,7 @@
2926
3027
Renders main module and test bicep code to the console instead of generating files.
3128
#>
29+
[CmdletBinding()]
3230
Param (
3331
[Parameter(Position = 0)][string] $Module = "*",
3432
[string] $Scope

‎src/scripts/Build-PowerBI.ps1‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
Creates PBIT files for each Power BI project.
77
88
.PARAMETER Name
9-
Name of the report to build. Wildcards supported. Default = * (all).
9+
Optional. Name of the report to build. Wildcards supported. Default = * (all).
1010
11-
.PARAMETER -KQL
12-
Indicates if the KQL reports should be generated. Default = false (will build all if no types are selected).
11+
.PARAMETER KQL
12+
Optional. Indicates if the KQL reports should be generated. Default = false (will build all if no types are selected).
1313
14-
.PARAMETER -Storage
15-
Indicates if the storage reports should be generated. Default = false (will build all if no types are selected).
14+
.PARAMETER Storage
15+
Optional. Indicates if the storage reports should be generated. Default = false (will build all if no types are selected).
1616
1717
.EXAMPLE
1818
./Build-PowerBI

‎src/scripts/Build-Toolkit.ps1‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,22 @@
66
Builds all toolkit modules and templates for publishing to the Bicep Registry and Azure Quickstart Templates.
77
88
.PARAMETER Template
9-
Optional. Name of the module or template to publish. Default = "*" (all templates and modules).
9+
Optional. Name of the module or template to build. Default = * (all templates and modules).
10+
11+
.PARAMETER Major
12+
Optional. Increments the major version number (x.0).
13+
14+
.PARAMETER Minor
15+
Optional. Increments the minor version number (0.x).
16+
17+
.PARAMETER Patch
18+
Optional. Increments the patch version number (0.0.x).
19+
20+
.PARAMETER Prerelease
21+
Optional. Increments the prerelease version number (0.0.0-ooo.x).
22+
23+
.PARAMETER Label
24+
Optional. Indicates the label to use for prerelease versions. Allowed: dev, rc, alpha, preview.
1025
1126
.EXAMPLE
1227
./Build-Toolkit

‎src/scripts/Build-Workbook.ps1‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55
.SYNOPSIS
66
Builds all workbook templates for publishing to Azure Quickstart Templates.
77
8+
.PARAMETER Workbook
9+
Optional. Name of the workbook folder to build.
10+
811
.EXAMPLE
912
./Build-Workbook workbook-name
10-
Generates a template the specified workbook.
11-
12-
.PARAMETER Workbook
13-
Name of the workbook folder.
1413
15-
.PARAMETER Debug
16-
Optional. Renders main module and test bicep code to the console instead of generating files. Line numbers map to original file.
14+
Generates a template for the specified workbook.
1715
#>
1816
Param (
1917
[Parameter(Position = 0)][string] $Workbook

‎src/scripts/Invoke-Task.ps1‎

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,25 @@
99
Run this from the /src/scripts folder.
1010
1111
.PARAMETER Task
12-
Required. Name of the task to execute.
12+
Optional. Name of the task to execute.
1313
14-
.PARAMETER Silent
15-
Optional. Indicates whether Invoke-Build should hide verbose build output. Default = false.
14+
.PARAMETER Major
15+
Optional. Increments the major version number (x.0). Only applies to version tasks.
16+
17+
.PARAMETER Minor
18+
Optional. Increments the minor version number (0.x). Only applies to version tasks.
19+
20+
.PARAMETER Patch
21+
Optional. Increments the patch version number (0.0.x). Only applies to version tasks.
22+
23+
.PARAMETER Prerelease
24+
Optional. Increments the prerelease version number (0.0.0-ooo.x). Only applies to version tasks.
25+
26+
.PARAMETER Label
27+
Optional. Indicates the label to use for prerelease versions. Allowed: dev, rc, alpha, preview. Only applies to version tasks.
28+
29+
.PARAMETER Version
30+
Optional. Sets the version number to an explicit value. Only applies to version tasks.
1631
1732
.PARAMETER Reset
1833
Optional. Indicates whether the BuildHelper module should be re-compiled. Use this when changing build tasks and scripts. Default = false.

‎src/scripts/New-Directory.ps1‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22
# Licensed under the MIT License.
33

44
<#
5-
.SYNOPSIS
5+
.SYNOPSIS
66
Creates a new directory if it doesn't already exist. Does not return an object.
7-
.EXAMPLE
7+
8+
.PARAMETER Path
9+
Path of the directory to create.
10+
11+
.EXAMPLE
812
./New-Directory foo
13+
914
Creates the "foo" directory.
1015
#>
1116
Param (

‎src/scripts/Publish-Toolkit.ps1‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,25 @@
66
Publishes a toolkit template, module, or documentation to its destination repo.
77
88
.PARAMETER Template
9-
Name of the template or module to publish. Default = * (all templates).
9+
Optional. Name of the template or module to publish. Default = * (all templates).
1010
1111
.PARAMETER QuickstartRepo
1212
Optional. Name of the folder where the Azure Quickstart Templates repo is cloned. Default = azure-quickstart-templates.
1313
1414
.PARAMETER RegistryRepo
1515
Optional. Name of the folder where the Bicep Registry repo is cloned. Default = bicep-registry-modules.
1616
17+
.PARAMETER AppInsightsRepo
18+
Optional. Name of the folder where the Application Insights Workbooks repo is cloned. Default = Application-Insights-Workbooks.
19+
20+
.PARAMETER DocsRepo
21+
Optional. Name of the folder where the Partner Center documentation repo is cloned. Default = partner-center-pr.
22+
1723
.PARAMETER Build
18-
Optional. Indicates whether the the Build-Toolkit command should be executed first. Default = false.
24+
Optional. Indicates whether the Build-Toolkit command should be executed first. Default = false.
1925
2026
.PARAMETER Branch
21-
Optional. Indicates whether the changes should be committed to a new branch in the Git repo. Default = false.
27+
Optional. Indicates whether the changes should be committed to a new branch in the Git repo. Alias: Commit. Default = false.
2228
2329
.EXAMPLE
2430
./Publish-Toolkit "finops-hub"

‎src/scripts/README.md‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,15 @@ Examples:
300300

301301
[Publish-Toolkit.ps1](./Publish-Toolkit.ps1) publishes a toolkit template, module, or documentation to its destination repo.
302302

303-
| Parameter | Description |
304-
| ----------------- | ----------------------------------------------------------------------------------------------------------------------- |
305-
| `‑Template` | Name of the template or module to publish. Default = * (all templates). |
306-
| `‑QuickstartRepo` | Optional. Name of the folder where the Azure Quickstart Templates repo is cloned. Default = azure-quickstart-templates. |
307-
| `‑RegistryRepo` | Optional. Name of the folder where the Bicep Registry repo is cloned. Default = bicep-registry-modules. |
308-
| `‑Build` | Optional. Indicates whether the the Build-Toolkit command should be executed first. Default = false. |
309-
| `‑Branch` | Optional. Indicates whether the changes should be committed to a new branch in the Git repo. Default = false. |
303+
| Parameter | Description |
304+
| ------------------ | ------------------------------------------------------------------------------------------------------------------------------- |
305+
| `‑Template` | Optional. Name of the template or module to publish. Default = * (all templates). |
306+
| `‑QuickstartRepo` | Optional. Name of the folder where the Azure Quickstart Templates repo is cloned. Default = azure-quickstart-templates. |
307+
| `‑RegistryRepo` | Optional. Name of the folder where the Bicep Registry repo is cloned. Default = bicep-registry-modules. |
308+
| `‑AppInsightsRepo` | Optional. Name of the folder where the Application Insights Workbooks repo is cloned. Default = Application-Insights-Workbooks. |
309+
| `‑DocsRepo` | Optional. Name of the folder where the Partner Center documentation repo is cloned. Default = partner-center-pr. |
310+
| `‑Build` | Optional. Indicates whether the Build-Toolkit command should be executed first. Default = false. |
311+
| `‑Branch` | Optional. Indicates whether the changes should be committed to a new branch in the Git repo. Alias: Commit. Default = false. |
310312

311313
Examples:
312314

0 commit comments

Comments
 (0)