diff options
| author | Ganesh Viswanathan <dev@genotrance.com> | 2020-06-19 13:32:01 -0500 |
|---|---|---|
| committer | Ganesh Viswanathan <dev@genotrance.com> | 2020-06-19 13:32:01 -0500 |
| commit | 0a2dc0c21ef1175a643405d1c2ced4f2af60d9c8 (patch) | |
| tree | 305e19c8b9c3baea4618f07821d41b2ef8f75c24 | |
| parent | cfe78d641a26cf55b3f3b1d8661fc3394e233f21 (diff) | |
| download | nimterop-0a2dc0c21ef1175a643405d1c2ced4f2af60d9c8.tar.gz nimterop-0a2dc0c21ef1175a643405d1c2ced4f2af60d9c8.zip | |
Retries, conan VS MD/14
| -rw-r--r-- | nimterop/build.nim | 8 | ||||
| -rw-r--r-- | nimterop/conan.nim | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/nimterop/build.nim b/nimterop/build.nim index b391f7a..edbe439 100644 --- a/nimterop/build.nim +++ b/nimterop/build.nim @@ -129,7 +129,7 @@ proc execAction*(cmd: string, retry = 0, die = true, cache = false, # On failure, retry or die as requested if result.ret != 0: if retry > 0: - sleep(500) + sleep(1000) result = execAction(cmd, retry = retry - 1, die, cache, cacheKey) elif die: doAssert false, "Command failed: " & $result.ret & "\ncmd: " & ccmd & @@ -368,7 +368,7 @@ proc downloadUrl*(url, outdir: string, quiet = false) = cmd = "powershell [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; wget $# -OutFile $#" else: doAssert false, "No download tool available - curl, wget" - discard execAction(cmd % [url.quoteShell, (outdir/file).sanitizePath], retry = 1) + discard execAction(cmd % [url.quoteShell, (outdir/file).sanitizePath], retry = 3) if ext == ".zip": extractZip(file, outdir, quiet) @@ -436,12 +436,12 @@ proc gitPull*(url: string, outdir = "", plist = "", checkout = "", quiet = false if checkout.len != 0: if not quiet: echo "# Checking out " & checkout - discard execAction(&"cd {outdirQ} && git fetch", retry = 1) + discard execAction(&"cd {outdirQ} && git fetch", retry = 3) discard execAction(&"cd {outdirQ} && git checkout {checkout}") else: if not quiet: echo "# Pulling repository" - discard execAction(&"cd {outdirQ} && git pull --depth=1 origin master", retry = 1) + discard execAction(&"cd {outdirQ} && git pull --depth=1 origin master", retry = 3) proc gitTags*(outdir: string): seq[string] = ## Get all the git tags in the specified directory diff --git a/nimterop/conan.nim b/nimterop/conan.nim index 41648a3..3430752 100644 --- a/nimterop/conan.nim +++ b/nimterop/conan.nim @@ -208,6 +208,10 @@ proc getConanBuilds*(pkg: ConanPackage, filter = "") = query &= &"&{filter}" if "compiler=" notin filter and os != "windows": query &= &"&compiler={compiler}&compiler.version=" & vfilter + if "compiler.runtime=" notin filter and os == "windows": + query &= &"&compiler.runtime=MD" + if "compiler.version=" notin filter and os == "windows": + query &= &"&compiler.version=14" query.replace("&", "%20and%20") else: "" |
