添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
帅呆的佛珠  ·  Jest: Module import ...·  昨天    · 
有腹肌的苦瓜  ·  Syntax for using ...·  4 天前    · 
才高八斗的香蕉  ·  How to enter \n with ...·  1 月前    · 
打盹的板栗  ·  Write LINQ queries - ...·  1 月前    · 
踢足球的领结  ·  Module ...·  1 月前    · 
豪情万千的米饭  ·  InfluxDB image do not ...·  1 月前    · 
活泼的砖头  ·  Amazon.com·  3 月前    · 
闷骚的红薯  ·  excel ...·  5 月前    · 

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>

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
    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…

My travis configuration file

This is invalid YAML. A multiline command should be inserted as a YAML literal block: before_install: if [[ $TRAVIS_OS_NAME == "windows" ]]; then echo Installing Google Chrome Stable... choco install googlechrome --acceptlicense --yes --no-progress --ignore-checksums Use https://config.travis-ci.com/explore to check whether your .travis.yml can be parsed and what it is parsed into.

Thank you! good to know

I still can’t understand what is the syntax of if not equal expression…

before_script:
  - if [[ "$TRAVIS_OS_NAME" NOT EQUAL "windows" ]]; then 
      <some code>