From 7bdb43ead8a147be6ceb5a45d798ef4a34b0bcf1 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 26 Nov 2018 23:36:48 +0800 Subject: fix repo update --- scripts/get.ps1 | 2 +- xmake/plugins/repo/main.lua | 4 ++-- 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"), {}) -- cgit v1.3.1