APPVEYOR_SCHEDULED_BUILD in deploy.ps1

thomas's Avatar

thomas

27 Mar, 2018 07:05 AM

As the subject states. Is it possible to know if the build is scheduled or forced in the deploy-script?

  1. 1 Posted by Ilya Finkelshte... on 27 Mar, 2018 06:58 PM

    Ilya Finkelshteyn's Avatar

    Sure. You can do this as described here. Here is a little bit customized YAML which works for me:

    before_deploy:
    # make it explicitly "False" if not scheduled. It is not set in this case by default
    - ps: $env:APPVEYOR_SCHEDULED_BUILD = if ($env:APPVEYOR_SCHEDULED_BUILD -eq "True") {"True"} else {"False"} 
    
    deploy:
    - provider: Environment
      name: MyAgentEnvironment
      APPVEYOR_SCHEDULED_BUIL: $(APPVEYOR_SCHEDULED_BUIL)
    
  2. Ilya Finkelshteyn closed this discussion on 25 Aug, 2018 02:27 AM.

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