Compare commits

...

5 Commits

Author SHA1 Message Date
Conrad Irwin
1b1a8bad51 Don't introduce more failure 2024-11-06 12:25:58 -07:00
Conrad Irwin
544b1e94c1 fix typo 2024-11-06 11:34:15 -07:00
Conrad Irwin
25901eace8 de-dbg 2024-11-06 11:17:41 -07:00
Conrad Irwin
8db3ea9eda Fix extension tests on release branches
Co-Authored-By: Max <max@zed.dev>
2024-11-06 11:08:45 -07:00
Peter Tripp
15a0b94222 v0.161.x preview 2024-11-06 11:09:02 -05:00
3 changed files with 14 additions and 9 deletions

View File

@@ -78,13 +78,18 @@ impl Extension {
version: SemanticVersion,
component: &Component,
) -> Result<Self> {
// Note: The release channel can be used to stage a new version of the extension API.
let allow_latest_version = match release_channel {
ReleaseChannel::Dev | ReleaseChannel::Nightly => true,
ReleaseChannel::Stable | ReleaseChannel::Preview => false,
};
if allow_latest_version && version >= latest::MIN_VERSION {
if version >= latest::MIN_VERSION {
// Note: The release channel can be used to stage a new version of the extension API.
// We always allow the latest in tests so that the extension tests pass on release branches.
let allow_latest_version = match release_channel {
ReleaseChannel::Dev | ReleaseChannel::Nightly => true,
ReleaseChannel::Stable | ReleaseChannel::Preview => cfg!(test),
};
if !allow_latest_version {
Err(anyhow!(
"unreleased versions of the extension API can only be used on development builds of Zed"
))?;
}
let extension =
latest::Extension::instantiate_async(store, component, latest::linker())
.await

View File

@@ -1 +1 @@
dev
preview

View File

@@ -15,7 +15,7 @@ version=$(script/get-crate-version zed)
channel=$(cat crates/zed/RELEASE_CHANNEL)
echo "Publishing version: ${version} on release channel ${channel}"
echo "RELEASE_CHANNEL=${channel}" >> $GITHUB_ENV
echo "RELEASE_VERSION="${version}" >> $GITHUB_ENV
echo "RELEASE_VERSION=${version}" >> $GITHUB_ENV
expected_tag_name=""
case ${channel} in