Skip to content

Commit 243eb88

Browse files
committed
Track msvs-tools master
1 parent 28e7411 commit 243eb88

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src-opam/windows.ml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,14 @@ module Cygwin = struct
181181
{|mklink %s\etc\postinstall\zp_zcygsympathy.sh %s\lib\cygsympathy\cygsympathy|}
182182
cyg.root cyg.root
183183

184-
let install_msvs_tools_from_source ?(version = "0.4.1") cyg =
184+
let install_msvs_tools_from_source ?(version = "refs/heads/master") cyg =
185+
let obj =
186+
match String.split_on_char '/' version with
187+
| [ "refs"; "heads"; branch ] -> branch
188+
| [ "refs"; "tags"; tag ] -> tag
189+
| [ x ] -> x
190+
| _ -> failwith "Unexpected version string"
191+
in
185192
add
186193
~src:
187194
[
@@ -191,7 +198,7 @@ module Cygwin = struct
191198
~dst:{|C:\TEMP\msvs-tools.tar.gz|} ()
192199
@@ run_sh ~cyg
193200
{|cd /tmp && tar -xf /cygdrive/c/TEMP/msvs-tools.tar.gz && cp msvs-tools-%s/msvs-detect msvs-tools-%s/msvs-promote-path /bin && rm -rf /cygdrive/c/TEMP/msvs-tools/*|}
194-
version version
201+
obj obj
195202

196203
let cygsetup ?(cyg = default) ?(upgrade = false) fmt =
197204
ksprintf

0 commit comments

Comments
 (0)