OpenAstronomy / azure-pipelines-templates

An opinionated set of Azure Pipelines templates for Python projects using pyproject.toml (PEP517) and tox
https://openastronomy-azure-pipelines.readthedocs.io/en/latest/
BSD 2-Clause "Simplified" License
11 stars 20 forks source link

Wrong conditional statement in documentation #57

Closed epassaro closed 2 years ago

epassaro commented 4 years ago

The following statement from the documentation does not work.

    ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/v') }}:

Need to be replaced with this.

    ${{ if startsWith(variables.Build.SourceBranch, 'refs/tags/v') }}:
Cadair commented 4 years ago

What error did you run into with it, we seem to be using it fine with sunpy: https://github.com/sunpy/sunpy/blob/master/azure-pipelines.yml#L90

I think either should be valid.

epassaro commented 4 years ago

What error did you run into with it, we seem to be using it fine with sunpy: https://github.com/sunpy/sunpy/blob/master/azure-pipelines.yml#L90

I think either should be valid.

I think both should be valid too. I don't know why I got this error so many times with the first expression:

/publish.yml@OpenAstronomy (Line: 88, Col: 19): Unable to convert from Object to String. Value: Object


This is a failed run log, but I messed up my original PR while squashing commits. I can try to reproduce it if you want.

Cadair commented 4 years ago

Oh that is probably #53