Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3490075
D6354.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D6354.diff
View Options
diff --git a/patches/hazel-server+5.1.1.patch b/patches/hazel-server+5.1.1.patch
new file mode 100644
--- /dev/null
+++ b/patches/hazel-server+5.1.1.patch
@@ -0,0 +1,38 @@
+diff --git a/node_modules/hazel-server/lib/cache.js b/node_modules/hazel-server/lib/cache.js
+index 65e9d30..f95f58d 100644
+--- a/node_modules/hazel-server/lib/cache.js
++++ b/node_modules/hazel-server/lib/cache.js
+@@ -105,16 +105,18 @@ module.exports = class Cache {
+ return
+ }
+
++ const desktopTagPrefix = 'desktop-';
++
+ const release = data.find(item => {
+ const isPre = Boolean(pre) === Boolean(item.prerelease)
+- return !item.draft && isPre
++ return !item.draft && isPre && item.tag_name.startsWith(desktopTagPrefix)
+ })
+
+ if (!release || !release.assets || !Array.isArray(release.assets)) {
+ return
+ }
+
+- const { tag_name } = release
++ const tag_name = release.tag_name.slice(desktopTagPrefix.length);
+
+ if (this.latest.version === tag_name) {
+ console.log('Cached version is the same as latest')
+diff --git a/node_modules/hazel-server/lib/routes.js b/node_modules/hazel-server/lib/routes.js
+index bbd6f14..28b7f72 100644
+--- a/node_modules/hazel-server/lib/routes.js
++++ b/node_modules/hazel-server/lib/routes.js
+@@ -210,7 +210,7 @@ module.exports = ({ cache, config }) => {
+ version: latest.version,
+ releaseNotes: `https://github.com/${config.account}/${
+ config.repository
+- }/releases/tag/${latest.version}`,
++ }/releases/tag/desktop-${latest.version}`,
+ allReleases: `https://github.com/${config.account}/${
+ config.repository
+ }/releases`,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Dec 19, 2:50 PM (21 h, 10 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2677728
Default Alt Text
D6354.diff (1 KB)
Attached To
Mode
D6354: [services] [electron update server] Patch hazel to work with desktop-vX.Y.Z tags
Attached
Detach File
Event Timeline
Log In to Comment