summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-11-26 23:36:48 +0800
committerruki <[email protected]>2018-11-26 15:40:52 +0800
commit7bdb43ead8a147be6ceb5a45d798ef4a34b0bcf1 (patch)
tree4f299087dd8bc2505fcabd1f40cd22a7b4dd73fc
parent336e108a834d3ef522d60678b45747d5daecd93e (diff)
fix repo update
-rw-r--r--scripts/get.ps12
-rw-r--r--xmake/plugins/repo/main.lua4
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/get.ps1 b/scripts/get.ps1
index e0c61e811..13d9caa1c 100644
--- a/scripts/get.ps1
+++ b/scripts/get.ps1
@@ -47,7 +47,7 @@ try{
writeErrorTip 'Please set environment var "TMP" to another path'
myExit 1
}
-Write-Host "Start downloading $version... Hope amazon S3 is not broken again"
+Write-Host "Start downloading xmake-installer v$version to $outfile .."
try{
Invoke-Webrequest "https://github.com/tboox/xmake/releases/download/$version/xmake-$version.exe" -OutFile "$outfile"
}catch{
diff --git a/xmake/plugins/repo/main.lua b/xmake/plugins/repo/main.lua
index 73427dcaf..c88918060 100644
--- a/xmake/plugins/repo/main.lua
+++ b/xmake/plugins/repo/main.lua
@@ -110,7 +110,7 @@ function _update()
vprint("pulling repository(%s): %s to %s ..", repo:name(), repo:url(), repodir)
-- pull it
- git.pull({verbose = option.get("verbose"), branch = "master", repodir = repodir})
+ git.pull({verbose = option.get("verbose"), branch = repo:branch() or "master", repodir = repodir})
-- mark as updated
io.save(path.join(repodir, "updated"), {})
@@ -120,7 +120,7 @@ function _update()
vprint("cloning repository(%s): %s to %s ..", repo:name(), repo:url(), repodir)
-- clone it
- git.clone(repo:url(), {verbose = option.get("verbose"), branch = "master", outputdir = repodir})
+ git.clone(repo:url(), {verbose = option.get("verbose"), branch = repo:branch() or "master", outputdir = repodir})
-- mark as updated
io.save(path.join(repodir, "updated"), {})