@@ -86,6 +86,54 @@ vsce publish --packagePath ./PowerShell-<version>.vsix
8686Publish-Script -Path ./Install-VSCode.ps1 -NuGetApiKey (Get-Secret "PowerShell Gallery API Key" -AsPlainText)
8787```
8888
89+ ### Versioning
90+
91+ For both our repositories we use Git tags in the form ` vX.Y.Z ` to mark the
92+ releases in the codebase. We use the GitHub Release feature to create these
93+ tags. Branches are used in the process of creating a release, e.g.
94+ ` release/vX.Y.Z ` , but are deleted after the release is completed (and merged
95+ into ` master ` ).
96+
97+ For PowerShellEditor Services, we simply follow semantic versioning, e.g.
98+ ` vX.Y.Z ` . We do not release previews frequently because this dependency is not
99+ generally used directly: it's a library consumed by other projects which
100+ themselves use preview releases for beta testing.
101+
102+ For the VS Code PowerShell Extension, our version follows ` vYYYY.MM.X ` , that is:
103+ current year, current month, and patch version (not day). This is not semantic
104+ versioning because of issues with how the VS Code marketplace and extension
105+ hosting API itself uses our version number. This scheme _ does not_ mean we
106+ release on a chronological schedule: we release based on completed work. If the
107+ month has changed over since the last release, the patch version resets to 1.
108+ Each subsequent release that month increments the patch version.
109+
110+ Before releasing a "stable" release we should almost always first release a
111+ "preview" of the same code. The exception to this is "hotfix" releases where we
112+ need to push _ only_ bug fixes out as soon as possible, and these should be built
113+ off the last release's codebase (found from the Git tag). The preview release is
114+ uploaded separately to the marketplace as the "PowerShell Preview" extension. It
115+ should not significantly diverge from the stable release ("PowerShell"
116+ extension), but is used for public beta testing. The preview version should
117+ match the upcoming stable version, but with ` -preview ` appended. When multiple
118+ previews are needed, the patch version is incremented, and the last preview's
119+ version is used for the stable release. (So the stable version may jump a few
120+ patch versions in between releases.)
121+
122+ For example, the date is May 7, 2022. The last release was in April, and its
123+ version was ` v2022.4.3 ` . Some significant work has been completed and we want to
124+ release the extension. First we create a preview release with version
125+ ` v2022.5.1-preview ` (the patch reset to 1 because the month changed, and
126+ ` -preview ` was appended). After publishing, some issues were identified and we
127+ decided we needed a second preview release. Its version is ` v2022.5.2-preview ` .
128+ User feedback indicates that preview is working well, so to create a stable
129+ release we use the same code (but with an updated changelog etc.) and use
130+ version ` v2022.5.2 ` , the _ first_ stable release for May (as ` v2022.5.1 ` was
131+ skipped due to those identified issues in the preview). All of these releases
132+ may consume the same or different version of PowerShell Editor Services, say
133+ ` v3.2.4 ` . It may update between preview versions or stable versions (but should
134+ not change between a preview and its associated stable release, as they should
135+ use the same code which includes dependencies).
136+
89137### Pending Improvements
90138
91139* ` Update-Changelog ` should verify the version is in the correct format
0 commit comments