ci: use a junction on Windows instead of a symlink
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Sun, 27 Jan 2019 23:26:53 +0000 (15:26 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Jan 2019 18:34:28 +0000 (10:34 -0800)
Symbolic links are still not quite as easy to use on Windows as on Linux
(for example, on versions older than Windows 10, only administrators can
create symlinks, and on Windows 10 you still need to be in developer
mode for regular users to have permission), but NTFS junctions can give
us a way out.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
ci/run-build-and-tests.sh
index 80d72d120f6fa9131859ce4433562fb4ab91ef35..74d838ea01883031246cb83342c5daaa9545333a 100755 (executable)
@@ -5,7 +5,10 @@
 
 . ${0%/*}/lib.sh
 
-ln -s "$cache_dir/.prove" t/.prove
+case "$CI_OS_NAME" in
+windows*) cmd //c mklink //j t\\.prove "$(cygpath -aw "$cache_dir/.prove")";;
+*) ln -s "$cache_dir/.prove" t/.prove;;
+esac
 
 make
 make --quiet test