run command based on environment variable

  1. Well, it could be something like:

    after_test: 
      - IF "%MyVar%"=="my_value" node_modules\.bin\grunt publish
    
  2. I'm trying to check if its not set. I'm current trying : - IF %APPVEYOR_PULL_REQUEST_NUMBER% LSS 1 node_modules\.bin\grunt publish

  3. IF %APPVEYOR_PULL_REQUEST_NUMBER% LSS 1 node_modules\.bin\grunt publish
    1 was unexpected at this time.

  4. Try this one:

    after_test: 
      - IF "%APPVEYOR_PULL_REQUEST_NUMBER%"=="" node_modules\.bin\grunt publish
    
  5. Awesome that worked!

  6. bniemyjski closed this discussion on 11 Apr, 2016 09:39 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac