From f8d0f8e608bb58e4a1dfeadf7d9068a8d6b471ae Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 9 Jan 2021 23:50:25 +0800 Subject: improve xmake update again --- xmake/actions/update/main.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xmake/actions/update/main.lua b/xmake/actions/update/main.lua index 16223fa57..a10817764 100644 --- a/xmake/actions/update/main.lua +++ b/xmake/actions/update/main.lua @@ -312,7 +312,8 @@ function main() local winarch = os.arch() == "x64" and "win64" or "win32" if version:find('.', 1, true) then - mainurls = {format("https://github.com/xmake-io/xmake/releases/download/%s/xmake-%s.%s.exe", version, version, winarch), + mainurls = {format("https://ci.appveyor.com/api/projects/waruqi/xmake/artifacts/xmake-installer.exe?tag=%s&pr=false&job=Image%%3A+Visual+Studio+2017%%3B+Platform%%3A+%s", version, os.arch()), + format("https://github.com/xmake-io/xmake/releases/download/%s/xmake-%s.%s.exe", version, version, winarch), format("https://cdn.jsdelivr.net/gh/xmake-mirror/xmake-releases@%s/xmake-%s.%s.exe.zip", version, version, winarch), format("https://gitlab.com/xmake-mirror/xmake-releases/raw/%s/xmake-%s.%s.exe.zip", version, version, winarch)} else @@ -320,7 +321,8 @@ function main() local tags = fetchinfo.tags table.sort(tags) local latest_version = tags[#tags] or ("v" .. xmake.version():shortstr()) - mainurls = {format("https://github.com/xmake-io/xmake/releases/download/%s/xmake-%s.%s.exe", latest_version, version, winarch)} + mainurls = {format("https://ci.appveyor.com/api/projects/waruqi/xmake/artifacts/xmake-installer.exe?branch=%s&pr=false&job=Image%%3A+Visual+Studio+2017%%3B+Platform%%3A+%s", version, os.arch()), + format("https://github.com/xmake-io/xmake/releases/download/%s/xmake-%s.%s.exe", latest_version, version, winarch)} end -- re-sort mainurls -- cgit v1.3.1