# auto-update: Fix auto-update loop with non-nightly channels \(\#43595\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c366627642fdf962d57e63c65f16d62d306beeb3)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c366627642fdf962d57e63c65f16d62d306beeb3

Requested commit: c366627642fdf962d57e63c65f16d62d306beeb3

Commit: c366627642fdf962d57e63c65f16d62d306beeb3

Tree: a245fa2d57fb56311ff70842085a8f539727ceda

Author: Piotr Osiewicz

Committer: GitHub

## Message

```
auto-update: Fix auto-update loop with non-nightly channels (#43595)

There are 3 factors:
1. The Preview channel endpoint does not propagate versions with build
identifier (which we oh-so-conveniently store in pre-release field of
semver).
2. Preview build, once fetched, sees it's version *with* build
identifier (as that's baked into the binary).
3. Auto update logic treats versions with pre-release version as less
than versions without pre-release version.

This in turn makes any Preview client see itself as versioned like
0.214.4-123-asdf1234455311, whereas the latest version on the endpoint
is 0.214.4. Thus, the endpoint version is always more recent than the
client version, causing an update loop.

The fix is to ignore build identifier when comparing versions of
non-nightly channels. This should still let us introduce changes to
auto-update behavior in minor releases in the future.

Closes #43584

Release Notes:

- (Preview only): Fixed an update loop with latest Preview update.
```

## Parents

- [ae649c66ed45cbb6336a4df35bf234671f088b2c](https://git.cafe/gitcafe/zed/commit/ae649c66ed45cbb6336a4df35bf234671f088b2c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c366627642fdf962d57e63c65f16d62d306beeb3?format=markdown)
