aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2017-02-18 16:01:13 +0100
committerMarc André Tanner <mat@brain-dump.org>2017-02-18 16:01:13 +0100
commit5f08d65b5142b13ee2df0e2b7991bdafafef7af2 (patch)
tree7b6d7e1beae0562d1bf4469d0f2fccce49d82844
parent4a38763ca83d9aaddecb7bc62da7b7c56c9e8897 (diff)
downloadvis-5f08d65b5142b13ee2df0e2b7991bdafafef7af2.tar.gz
vis-5f08d65b5142b13ee2df0e2b7991bdafafef7af2.tar.xz
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.
-rw-r--r--.appveyor.yml18
1 files changed, 18 insertions, 0 deletions
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"'