@@ -80,17 +80,65 @@ New-DraftRelease -RepositoryName vscode-powershell
80
80
# Upload PowerShellEditorServices.zip (for other extensions)
81
81
# Upload VSIX and Install-VSCode.ps1
82
82
# Publish draft releases and merge (don't squash!) branches
83
+ # Check telemetry for stability before releasing
83
84
vsce publish --packagePath ./PowerShell-<version>.vsix
84
85
# Update Install-VSCode.ps1 on gallery
85
86
Publish-Script -Path ./Install-VSCode.ps1 -NuGetApiKey (Get-Secret "PowerShell Gallery API Key" -AsPlainText)
86
87
```
87
88
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 0.
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.0-preview ` (the patch reset to 0 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.1-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.1 ` , the _ first_ stable release for May (as ` v2022.5.0 ` 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
+
88
137
### Pending Improvements
89
138
90
139
* ` Update-Changelog ` should verify the version is in the correct format
91
140
* ` Update-Changelog ` could be faster by not downloading _ every_ PR
92
141
* ` Update-Changelog ` should use exactly two emoji and in the right order
93
142
* ` Update-Version ` could be run by ` Update-Changelog `
94
- * ` New-DraftRelease ` could automatically set the tag pointers and upload the binaries
95
143
* The build should emit an appropriately named VSIX instead of us manually renaming it
96
144
* A ` Publish-Binaries ` function could be written to push the binaries out
0 commit comments