summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-12-21 00:47:45 +0800
committerruki <[email protected]>2018-12-20 22:46:33 +0800
commitc727b7173ddd2a9f617275d5876e73dddb880543 (patch)
tree3099dac04e5dac7775b730384c9a7a6719919eae
parentf1065f8b97b0521a57782eca4e9758929aebcd70 (diff)
add some package mirrors
-rw-r--r--xmake/actions/update/main.lua12
-rw-r--r--xmake/repository/packages/7/7z/xmake.lua6
-rw-r--r--xmake/repository/packages/g/git/xmake.lua8
3 files changed, 20 insertions, 6 deletions
diff --git a/xmake/actions/update/main.lua b/xmake/actions/update/main.lua
index 98c3f570d..a359c2e0c 100644
--- a/xmake/actions/update/main.lua
+++ b/xmake/actions/update/main.lua
@@ -256,15 +256,23 @@ function main()
-- get urls on windows
if is_host("windows") then
if version:find('.', 1, true) then
- mainurls = {format("https://github.com/tboox/xmake/releases/download/%s/xmake-%s.exe", version, version)}
+ mainurls = {format("https://github.com/tboox/xmake/releases/download/%s/xmake-%s.exe", version, version),
+ format("https://qcloud.coding.net/u/waruqi/p/xmake-releases/git/raw/master/xmake-%s.exe", version),
+ format("https://gitlab.com/xmake-mirror/xmake-releases/raw/master/xmake-%s.exe", version)}
else
local lastest = semver.select("lastest", tags or {}, tags or {}, {})
if lastest then
- mainurls = {format("https://github.com/tboox/xmake/releases/download/%s/xmake-%s.exe", lastest, version)}
+ mainurls = {format("https://github.com/tboox/xmake/releases/download/%s/xmake-%s.exe", lastest, version),
+ format("https://qcloud.coding.net/u/waruqi/p/xmake-releases/git/raw/master/xmake-%s.exe", version),
+ format("https://gitlab.com/xmake-mirror/xmake-releases/raw/master/xmake-%s.exe", version)}
else
raise("not support to update %s on windows!", version)
end
end
+
+ -- re-sort mainurls
+ fasturl.add(mainurls)
+ mainurls = fasturl.sort(mainurls)
end
-- trace
diff --git a/xmake/repository/packages/7/7z/xmake.lua b/xmake/repository/packages/7/7z/xmake.lua
index d5aa25318..5ddbeed72 100644
--- a/xmake/repository/packages/7/7z/xmake.lua
+++ b/xmake/repository/packages/7/7z/xmake.lua
@@ -7,11 +7,13 @@ package("7z")
if os.host() == "windows" then
if os.arch() == "x64" then
set_urls("https://github.com/xmake-mirror/7zip/releases/download/$(version)/7z$(version)-x64.zip",
- "https://gitlab.com/xmake-mirror/7zip/uploads/878feb6ad6f95854e2c1d861f7f6cd0d/7z$(version)-x64.zip")
+ "https://gitlab.com/xmake-mirror/7zip-releases/raw/master/7z$(version)-x64.zip",
+ "https://qcloud.coding.net/u/waruqi/p/7zip-releases/git/raw/master/7z$(version)-x64.zip")
add_versions("18.05", "e6e2d21e2c482f1b1c5a6d21ed80800ce1273b902cf4b9afa68621545540ee2f")
else
set_urls("https://github.com/xmake-mirror/7zip/releases/download/$(version)/7z$(version)-x86.zip",
- "https://gitlab.com/xmake-mirror/7zip/uploads/b7ac5f096c5ff27c257780575c1015c7/7z$(version)-x86.zip")
+ "https://gitlab.com/xmake-mirror/7zip-releases/raw/master/7z$(version)-x86.zip",
+ "https://qcloud.coding.net/u/waruqi/p/7zip-releases/git/raw/master/7z$(version)-x86.zip")
add_versions("18.05", "544c37bebee30437aba405071484e0ac6310332b4bdabe4ca7420a800d4b4b5e")
end
else
diff --git a/xmake/repository/packages/g/git/xmake.lua b/xmake/repository/packages/g/git/xmake.lua
index e2e5de408..cfe711fda 100644
--- a/xmake/repository/packages/g/git/xmake.lua
+++ b/xmake/repository/packages/g/git/xmake.lua
@@ -6,14 +6,18 @@ package("git")
if os.host() == "windows" then
if os.arch() == "x64" then
- add_urls("https://github.com/git-for-windows/git/releases/download/v$(version).windows.1/MinGit-$(version)-64-bit.zip")
+ add_urls("https://github.com/git-for-windows/git/releases/download/v$(version).windows.1/MinGit-$(version)-64-bit.zip",
+ "https://gitlab.com/xmake-mirror/git-for-windows-releases/raw/master/MinGit-$(version)-64-bit.zip",
+ "https://qcloud.coding.net/u/waruqi/p/git-for-windows-releases/git/raw/master/MinGit-$(version)-64-bit.zip")
if winos.version():gt("winxp") then
add_versions("2.20.0", "f577f81c401535858761fc4857a105337cc12880b79e72f89d0740167083d287")
else
add_versions("2.10.0", "2e1101ec57da526728704c04792293613f3c5aa18e65f13a4129d00b54de2087")
end
else
- add_urls("https://github.com/git-for-windows/git/releases/download/v$(version).windows.1/MinGit-$(version)-32-bit.zip")
+ add_urls("https://github.com/git-for-windows/git/releases/download/v$(version).windows.1/MinGit-$(version)-32-bit.zip",
+ "https://gitlab.com/xmake-mirror/git-for-windows-releases/raw/master/MinGit-$(version)-32-bit.zip",
+ "https://qcloud.coding.net/u/waruqi/p/git-for-windows-releases/git/raw/master/MinGit-$(version)-32-bit.zip")
if winos.version():gt("winxp") then
add_versions("2.20.0", "39d3dce9f67d7ae884edf0416d28f6dd8e24b6326de8e509613a2b12fb4f0820")
else