You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ We are very happy to accept community contributions to Bicep, whether those are
6
6
7
7
## Getting Started
8
8
9
-
* If you haven't already, you will need [dotnet](https://dotnet.microsoft.com/download) core sdk 6.0.100 and [node + npm](https://nodejs.org/en/download/) 10 (or later) installed locally to build and run this project.
9
+
* If you haven't already, you will need [dotnet](https://dotnet.microsoft.com/download) core sdk 7.0.100 and [node + npm](https://nodejs.org/en/download/) 10 (or later) installed locally to build and run this project.
10
10
* You are free to work on Bicep on any platform using any editor, but you may find it quickest to get started using [VSCode](https://code.visualstudio.com/Download) with the [C# extension](https://marketplace.visualstudio.com/items?itemName=ms-dotnettools.csharp).
11
11
* Fork this repo (see [this forking guide](https://guides.github.com/activities/forking/) for more information).
12
12
* Checkout the repo locally with `git clone [email protected]:{your_username}/bicep.git`.
@@ -78,6 +78,7 @@ If you have an active branch pushed to your GitHub fork, you can use the "Update
78
78
* The name of the entry should match the name of the folder you create (same casing), and there should be a main.bicep file in that folder.
79
79
1. Make changes to main.bicep.
80
80
1. Create empty `main.<suffix>.bicep` assertion files in the folder. You need to create following suffixes: `diagnostics`, `formatted`, `symbols`, `syntax`, `tokens`
81
+
* If the dataset is expected to compile successfully, add additional bicep files with suffixes `ir`, `sourcemap` and two json files `main.json` and `main.symbolicnames.json` with initial content `{}`.
81
82
1. Follow [Updating test baselines](#updating-test-baselines) to generate baseline files.
82
83
* The naming and file structure is important here as it's used by the test runner to assert e.g. whether the example should compile, and the end-of-line characters.
83
84
* For tests that deal with module, you may see some unexpected behavior because the test could be using a mock file resolver instead of the standard one. Similarly, some tests may be using a mock resource type provider instead of the standard ones - usually that explains why some types aren't recognized in tests.
@@ -87,7 +88,7 @@ If you have an active branch pushed to your GitHub fork, you can use the "Update
87
88
* On the first run, you'll need to ensure you have installed all the npm packages required by the Bicep VSCode extension with the following:
88
89
*`cd src/vscode-bicep`
89
90
*`npm i`
90
-
* In the [VSCode Run View](https://code.visualstudio.com/Docs/editor/debugging), select the "VSCode Extension" task, and press the "Start" button. This will launch a new VSCode window with the Bicep extension and LanguageServer containing your changes. When running on WSL, create a symbolic link in `src/vscode-bicep` named `bicepLanguageServer` to `../Bicep.LangServer/bin/Debug/net6.0`.
91
+
* In the [VSCode Run View](https://code.visualstudio.com/Docs/editor/debugging), select the "VSCode Extension" task, and press the "Start" button. This will launch a new VSCode window with the Bicep extension and LanguageServer containing your changes. When running on WSL, create a symbolic link in `src/vscode-bicep` named `bicepLanguageServer` to `../Bicep.LangServer/bin/Debug/net7.0`.
91
92
* If you want the ability to set breakpoints and step through the C# code, you can also use the "Attach" run configuration once the extension host has launched, and select the Bicep LanguageServer process by searching for "dotnet" processes with a command line containing "...\Bicep.LangServer.dll --pipe=..." (Windows) or "vscode-*.sock" (MacOs).
1. (**end-of-month releases only**) Update Bicep Az types:
4
+
1. Run the [Update Types](https://github.com/Azure/bicep-types-az/actions/workflows/update-types.yml) GitHub Action to generate the latest type definitions.
5
+
1. Wait ~3hrs for the previous step to complete. Ensure it runs successfully, and generates + merges a PR (example [here](https://github.com/Azure/bicep-types-az/pull/1299)).
6
+
1. Run the Official Build (see [this README](https://msazure.visualstudio.com/One/_git/BicepMirror-Types-Az) for instructions).
7
+
1. Publish Bicep.Types NuGet packages to nuget.org. Follow the latter half of the readme [here](https://dev.azure.com/msazure/One/_git/BicepMirror-Types-Az) and the below steps.
8
+
1. Find your build [here](https://dev.azure.com/msazure/One/_build?definitionId=179851&_a=summary) and wait for it to finish successfully. Then click on it and for the `drop_build_main`, download the artifacts.
9
+
1. Follow instructions to download the nuget.exe from [here](https://learn.microsoft.com/en-us/nuget/install-nuget-client-tools)
10
+
1. Run `./scripts/UploadPackages.ps1 -PackageDirectory <downloads>/drop_build_main -NuGetPath <nuget_tool_directory>`
11
+
1. You need to be part of the armdeployments org on nuget.org. (Ask one of the admins to be added) You must generate an API key and then use that as the password for when the popup window appears after running the above command. (Username can be anything)
12
+
1. Bump the Bicep.Types NuGet package version in this project in this [file](https://github.com/Azure/bicep/blob/main/src/Bicep.Core/Bicep.Core.csproj) by creating and merging a PR
13
+
1. Might need to run a `dotnet refresh` to update the packages.lock.json files
14
+
1. Might also need to update baseline tests (run `bicep/scripts/SetBaseline.ps1`)
15
+
1. Verify the latest build on the `main` branch is green: .
16
+
1. Review history for changes to [bicepconfig.schema.json](https://github.com/Azure/bicep/commits/main/src/vscode-bicep/schemas/bicepconfig.schema.json). Raise an issue for any recently-added linter rules which do not have public documentation.
17
+
1. (**end-of-month releases only**) Bump the version number by incrementing the minor version number in [this file](https://github.com/Azure/bicep/blob/main/version.json) (example [here](https://github.com/Azure/bicep/pull/9698))
18
+
1. Run the Official Build (see [this README](https://msazure.visualstudio.com/One/_git/BicepMirror) for instructions).
19
+
1. Get version number from official build by looking at the artifacts and push a new tag to the Bicep repo. This should be of format `vXX.YY.ZZ` - e.g `v0.14.85`.
20
+
1. In the Bicep repo, make sure you are on the main branch and on the latest commit.
21
+
1. Run git tag v<new_release_number> (ex: git tag v0.15.31)
1.[Create a draft release](https://github.com/Azure/bicep/releases/new) for the new tag and set release title to the tag name. Use the "Save draft" button to save the changes without publishing it.
24
+
1. Run `bicep/scripts/CreateReleaseNotes -FromTag <previous tag> -ToTag <new tag>` and set the output as the release description.
25
+
1. Give the output of this script to a PM, and ask them to clean up the notes for the release.
26
+
1. Once they have cleaned up the notes, copy + paste them into the draft notes, and hit "Save draft" again.
27
+
1. Run `BicepMirror/scripts/UploadSignedReleaseArtifacts.ps1` to add official artifacts to the release.
28
+
*`-WorkingDir` can be any empty temporary directory that you create
29
+
*`-BuildId` is only needed if the latest official build is NOT the official build you are trying to release
30
+
1. Validate VSCode extension and Bicep CLI manually on Windows, Mac & Linux:
31
+
1. Download `vscode-bicep.vsix` from the draft release, and [Install it from VSIX](https://code.visualstudio.com/docs/editor/extension-marketplace#_install-from-a-vsix). Verify that you can open a Bicep file, that text is correctly colorized, and that error messages show up as expected.
32
+
1. Download the appropriate Bicep executable for your platform (e.g. `bicep-linux-x64`). Verify you can invoke it with e.g. `bicep-linux-x64 --version`, and that it prints the expected output.
33
+
1. Publish the release on GitHub.
34
+
1. Upload copyleft dependency source to 3rd party disclosure site. See [instructions](https://msazure.visualstudio.com/One/_wiki/wikis/Azure%20Deployments%20Team%20Wiki/369910/Bicep-release-step-Upload-copyleft-source-to-3rd-party-disclosure-site).
35
+
1. Upload vscode-bicep.VSIX to the VS marketplace [here](https://marketplace.visualstudio.com/manage).
36
+
1. Click on the ... for Bicep, then Update, then upload the .vsix file. The site will verify it then the version number should be updated to the right one.
37
+
1. Upload vs-bicep.VSIX to VS marketplace
38
+
1. Click on the ... for Bicep for Visual Studio, then Edit. Once on the new page, upload the new vs-bicep.VSIX file at the top. This should update the Version number automatically for you. Verify that it does then scroll to the bottom and hit Save and Upload.
39
+
1. Upload NuGet packages to nuget.org via `./scripts/PublishPackages.ps1`. (Make sure to include CLI packages. Easiest is to use the `__assets` directory created by the `UploadSignedReleaseArtifacts.ps1` script.)
40
+
1. Update homebrew by going here [here](https://github.com/Azure/homebrew-bicep/actions/workflows/update-homebrew.yml) and clicking on `Run workflow`
41
+
* A PR will be auto created by this action (example [here](https://github.com/Azure/homebrew-bicep/pull/40)). Approve and merge it.
0 commit comments