cobnitional build question

John Deemar's Avatar

John Deemar

13 Apr, 2020 10:44 PM

So I have yml, I want build: section to conditionalize on debug versus release build. Basically - deploy on release - not debug build.

my syntax is way wrong:
build:
  project: src/%slnname%.sln
  - Release
    publish_nuget: true
  - Debug
    publish_nuget: false
  verbosity: normal

Help a newbie out?

  1. 1 Posted by John Deemar on 13 Apr, 2020 10:53 PM

    John Deemar's Avatar

    configuration:
    - Debug
    - Release

  2. Support Staff 2 Posted by Feodor Fitsner on 14 Apr, 2020 01:57 AM

    Feodor Fitsner's Avatar

    Hi John,

    This is what you need: https://www.appveyor.com/docs/build-configuration/#specializing-mat...

    For your specific case you can try the following:

    configuration:
      - Debug
      - Release
    
    build:
      project: src\%slnname%.sln
      publish_nuget: false
      verbosity: normal
    
    for:
    -
      matrix:
        only:
          - configuration: Release
    
      build:
        publish_nuget: true
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

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