mirror of
https://github.com/visioncortex/vtracer.git
synced 2026-09-26 05:51:21 -07:00
Fix macOS desktop download link
This commit is contained in:
Generated
+18
-1
@@ -414,6 +414,22 @@
|
|||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function publicDownloadUrl(manifest, platform, updaterUrl) {
|
||||||
|
if (platform.label !== 'macOS') {
|
||||||
|
return updaterUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (manifest.version) {
|
||||||
|
return 'https://github.com/visioncortex/vtracer/releases/download/' +
|
||||||
|
manifest.version +
|
||||||
|
'/VTracer_' +
|
||||||
|
manifest.version +
|
||||||
|
'_universal.dmg';
|
||||||
|
}
|
||||||
|
|
||||||
|
return updaterUrl.replace(/_universal\.app\.tar\.gz$/i, '_universal.dmg');
|
||||||
|
}
|
||||||
|
|
||||||
var platform = detectPlatform();
|
var platform = detectPlatform();
|
||||||
setFallback(platform);
|
setFallback(platform);
|
||||||
|
|
||||||
@@ -442,7 +458,8 @@
|
|||||||
return response.json();
|
return response.json();
|
||||||
})
|
})
|
||||||
.then(function(manifest) {
|
.then(function(manifest) {
|
||||||
var downloadUrl = findPlatformDownload(manifest.platforms || {}, platform);
|
var updaterUrl = findPlatformDownload(manifest.platforms || {}, platform);
|
||||||
|
var downloadUrl = publicDownloadUrl(manifest, platform, updaterUrl);
|
||||||
|
|
||||||
if (!downloadUrl) {
|
if (!downloadUrl) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user