@@ -74,14 +74,14 @@ New-ReleaseBundle -PsesVersion <version> -VsceVersion <version>
74
74
# Permit vscode-extension pipeline to publish to marketplace
75
75
```
76
76
77
- If rolling from pre-release to stable , use:
77
+ If rolling from pre-release to release , use:
78
78
79
79
``` powershell
80
80
New-Release -RepositoryName vscode-powershell -Version <version>
81
81
```
82
82
83
83
This is because we do not change the version of PowerShell Editor Services between a
84
- pre-release and the subsequent stable release, so we only need to release the extension.
84
+ pre-release and the subsequent release, so we only need to release the extension.
85
85
86
86
### Versioning
87
87
@@ -97,48 +97,54 @@ For PowerShellEditor Services, we simply follow semantic versioning, e.g.
97
97
generally used directly: it's a library consumed by other projects which
98
98
themselves use pre-releases for beta testing.
99
99
100
- For the VS Code PowerShell Extension, our version follows ` vYYYY.M.X ` , that is:
101
- current year, current month, and patch version (not day). This is not semantic
102
- versioning because of issues with how the VS Code marketplace and extension
103
- hosting API itself uses our version number. This scheme _ does not_ mean we
104
- release on a chronological schedule: we release based on completed work. If the
105
- month has changed over since the last release, the patch version resets to 0.
106
- Each subsequent release that month increments the patch version.
107
-
108
- Before releasing a stable version we should almost always first release a preview of the
109
- same code, which is a _ pre-release_ . The exception to this is hotfix releases where we
110
- need to push _ only_ bug fixes out as soon as possible, and these should be built off the
111
- last release's codebase (found from the Git tag). The pre-release is uploaded to the
112
- marketplace using the ` --pre-release ` flag given to ` vsce ` (the CLI tool used to do so).
113
- The previous separate "PowerShell Preview" extension has been deprecated in favor of using
114
- the marketplace's support for [ pre-releases] [ ] on the stable and now one-and-only
100
+ For the VS Code PowerShell Extension, our version follows ` vYYYY.X.Z ` , that is: current
101
+ year, minor version, and patch version. This is not semantic versioning because of issues
102
+ with how the VS Code marketplace and extension hosting API itself uses our version number.
103
+ We do not release on a chronological schedule: we release based on completed work. For
104
+ historical reasons we are stuck with the major version being year.
105
+
106
+ Before releasing a stable version (a _ release_ ) we should almost always first release a
107
+ preview of the same code, which is a _ pre-release_ . The exception to this is hotfix
108
+ releases where we need to push _ only_ bug fixes out as soon as possible, and these should
109
+ be built off the last release's codebase (found from the Git tag). The pre-release is
110
+ uploaded to the marketplace using the ` --pre-release ` flag given to ` vsce ` (the CLI tool
111
+ used to do so). The previous separate "PowerShell Preview" extension has been deprecated
112
+ in favor of using the marketplace's support for [ pre-releases] [ ] on the one-and-only
115
113
extension.
116
114
117
115
Because the marketplace does not actually understand Semantic Versioning pre-release tags
118
116
(the ` -preview ` suffix), the patch numbers need to increment continuously, but we append
119
117
` -preview ` to _ our_ version in the changelog and Git tags. When multiple pre-releases are
120
118
needed, the patch version is incremented (again because the marketplace ignores the
121
- pre-release tag, we can't do ` -alpha ` , ` -beta ` etc.). Since migrating to a single
122
- extension, the stable release has to increment one more after the last pre-release. So the
123
- stable version may jump a few patch versions in between releases. Furthermore, the
124
- ` preview ` field in the extension's manifest (the ` package.json ` file) is _ always_ ` false ` ,
125
- even for pre-releases, because the marketplace takes the information from the latest
126
- release inclusive of pre-releases, hence it was causing the one-and-only extension to look
127
- like it was in preview. This is also why the icon no longer changes to the PowerShell
128
- Preview icon for pre-releases. When they support pre-releases better (ideally that means
129
- supporting the pre-release tags in full) we can revisit this.
119
+ pre-release tag, we can't do ` -alpha ` , ` -beta ` etc.). The ` preview ` field in
120
+ the extension's manifest (the ` package.json ` file) is _ always_ ` false ` , even for
121
+ pre-releases, because the marketplace takes the information from the latest release
122
+ inclusive of pre-releases, hence it was causing the one-and-only extension to look like it
123
+ was in preview. This is also why the icon no longer changes to the PowerShell Preview icon
124
+ for pre-releases. When they support pre-releases better (ideally that means supporting the
125
+ pre-release tags in full) we can revisit this.
126
+
127
+ Furthermore, for releases, the minor version must be _ even_ (like 0, 2, etc.) and for
128
+ pre-releases it must be _ odd_ (like 1, 3, etc.), and an upcoming release's version must be
129
+ ` n-1 ` of the pre-release which previews it. That is, release ` v2024.0.0 ` is previewed in
130
+ the pre-release ` v2024.1.0 ` . This scheme is designed such that the "newest" (by version)
131
+ release is always a pre-release, so that the VS Code marketplace _ always_ shows a
132
+ pre-release option. When we previously did this the other way around (incrementing the
133
+ release as ` n+1 ` to the pre-release), every time we released, the pre-release option
134
+ (dropdown) in the marketplace would unfortunately disappear.
130
135
131
136
[ pre-releases ] : https://code.visualstudio.com/api/working-with-extensions/publishing-extension#prerelease-extensions
132
137
133
- For example, the date is May 7, 2022. The last release was in April, and its version was
134
- ` v2022.4.3 ` . Some significant work has been completed and we want to release the
135
- extension. First we create a pre-release with version ` v2022.5.0-preview ` (the patch reset
136
- to 0 because the month changed, and ` -preview ` was appended). After publishing, some
137
- issues were identified and we decided we needed a second pre-release. Its version is
138
- ` v2022.5.1-preview ` . User feedback indicates that pre-release is working well, so to
139
- create a stable release we use the same code (but with an updated changelog etc.) and use
140
- version ` v2022.5.2 ` , the _ first_ stable release for May (as ` v2022.5.0 ` was skipped due to
141
- those identified issues in the pre-release). All of these releases may consume the same or
142
- different version of PowerShell Editor Services, say ` v3.2.4 ` . It may update between
143
- pre-release versions or stable versions, but must not change between a pre-release and the
144
- subsequent stable release, as they should use the same code which includes dependencies.
138
+ For example, the date is August 23, 2023. The last release was in June, and its version
139
+ was ` v2023.6.0 ` . Some significant work has been completed and we want to release the
140
+ extension, so the next release will be ` v2023.8.0 ` (the minor version is ` n+2 ` because it
141
+ must remain even, it only coincidentally matches the month). That means first we create a
142
+ pre-release with version ` v2023.9.0-preview ` (the minor version is ` n+1 ` of the upcoming
143
+ release, and ` -preview ` was appended). After publishing, some issues were identified and
144
+ we decided we needed a second pre-release. Its version is ` v2023.9.1-preview ` . User
145
+ feedback hopefully indicates that the pre-release is working well, so to create a release
146
+ we will use the same code (but with an updated changelog etc.) and use version
147
+ ` v2023.8.0 ` , the _ next_ release since ` v2023.6.0 ` . The version of PowerShell Editor
148
+ Services may update between pre-releases or releases, but must not change between a
149
+ pre-release and its subsequent release, as they should use the same code (which includes
150
+ dependencies).
0 commit comments