From 5f08d65b5142b13ee2df0e2b7991bdafafef7af2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Sat, 18 Feb 2017 16:01:13 +0100 Subject: appveyor: fix symlinks for Cygwin builds Git for windows is used to checkout the repository and it creates broken symlinks (files containing the target) which break the tests because e.g. the lexer.lua module can not be loaded. We use a bash script to convert these pseudo symlinks: http://stackoverflow.com/questions/38140373 and invoke it via powershell because that seems to be the only way to execute multiline commands from within the AppVeyor YAML configuration file. --- .appveyor.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.appveyor.yml b/.appveyor.yml index 92db322..81e4d20 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -31,6 +31,24 @@ install: before_build: - '%CYG_ROOT%\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER && make clean"' + - ps: >- + $BashPath = $env:CYG_ROOT + "\bin\bash" + $cmd = "cd " + $env:APPVEYOR_BUILD_FOLDER + " && " + $cmd += + @' + for f in $(git ls-files -s | awk '$1 == 120000 {print $4}') + do + # echo $f is a symlink pointing to $dir/$target + dir=$(dirname "${f}") + pushd "$dir" 2>&1 > /dev/null + file=$(basename "$f") + target=`cat "$file"` + rm "$file" + ln -s "$target" "$file" + popd 2>&1 > /dev/null + done + '@ + & $BashPath -lc $cmd build_script: - '%CYG_ROOT%\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER && make local && file vis"' -- cgit v1.2.3