summaryrefslogtreecommitdiff
path: root/xmake/repository
diff options
context:
space:
mode:
authorruki <[email protected]>2018-12-13 23:53:08 +0800
committerruki <[email protected]>2018-12-13 17:18:49 +0800
commitb3fa23bff3a8a34e832a10ef714224d6e728ebd3 (patch)
tree1aa20f227a117efdf4e589ba8e31ea5f700f7932 /xmake/repository
parent11d0bbaebf5804d331ffa126ec0dab21913dad15 (diff)
improve git package
Diffstat (limited to 'xmake/repository')
-rw-r--r--xmake/repository/packages/g/git/xmake.lua33
1 files changed, 17 insertions, 16 deletions
diff --git a/xmake/repository/packages/g/git/xmake.lua b/xmake/repository/packages/g/git/xmake.lua
index 0076dd64e..e2e5de408 100644
--- a/xmake/repository/packages/g/git/xmake.lua
+++ b/xmake/repository/packages/g/git/xmake.lua
@@ -6,31 +6,32 @@ package("git")
if os.host() == "windows" then
if os.arch() == "x64" then
- add_urls("https://github.com/tboox/xmake-win64env/archive/$(version).zip", {alias = "github"})
- add_urls("https://gitlab.com/tboox/xmake-win64env/-/archive/$(version)/xmake-win64env-$(version).zip", {alias = "gitlab"})
- add_versions("github:v1.0.3", "df43e419a358b136cfc0ae343560684321722a39713c205a7a894edd9d15b2b5")
- add_versions("gitlab:v1.0.3", "376807a3386f15e734f3b2f51ed5d151d434fb99b7349412a2fb9e83d5e29d5c")
+ add_urls("https://github.com/git-for-windows/git/releases/download/v$(version).windows.1/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/tboox/xmake-win32env/archive/$(version).zip", {alias = "github"})
- add_urls("https://gitlab.com/tboox/xmake-win32env/-/archive/$(version)/xmake-win32env-$(version).zip", {alias = "gitlab"})
- add_versions("github:v1.0.3", "2a3b71baae67f3ebb057748d1261970d18d80be52e88427a4719d2185594fc21")
- add_versions("gitlab:v1.0.3", "2a627f78349702a85b710399c14f5dc0acfdb5ad840765e3e2637d554a373807")
+ add_urls("https://github.com/git-for-windows/git/releases/download/v$(version).windows.1/MinGit-$(version)-32-bit.zip")
+ if winos.version():gt("winxp") then
+ add_versions("2.20.0", "39d3dce9f67d7ae884edf0416d28f6dd8e24b6326de8e509613a2b12fb4f0820")
+ else
+ add_versions("2.10.0", "36f890870126dcf840d87eaec7e55b8a483bc336ebf8970de2f9d549a3cfc195")
+ end
end
end
+ on_load("windows", function (package)
+ package:addenv("PATH", path.join("share", "MinGit", "cmd"))
+ end)
+
on_install("macosx", "linux", function (package)
import("package.manager.install")("git")
end)
on_install("windows", function (package)
-
- -- install winenv with git
- local winenv_dir = path.join(val("globaldir"), "winenv")
- os.mkdir(winenv_dir)
- os.cp("*", winenv_dir)
-
- -- load winenv
- import("winenv", {rootdir = winenv_dir})(winenv_dir)
+ os.cp("*", package:installdir("share/MinGit"))
end)
on_test(function (package)