Hi,
I can’t fully understand the syntax in two cases:
1 - if not
statement. For example I need to exclude windows
OS then I try:
before_script:
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then
<some code>
fi
but this doesn’t work
2 - I need to add dir to PATH
env var within and out of if
statement:
before_script:
- if [[ "$TRAVIS_COMPILER" == "gcc" ]]; then
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/lib; # this works
fi
export PATH=$PATH:$CMAKE_INSTALL_PREFIX/bin; # this doesn't work
could someone explain this? I can see the documentation about logical operators but it seems that it doesn’t cover my use cases…