GitHub tag created with .buildNumber

Sean Feldman's Avatar

Sean Feldman

May 01, 2017 @ 05:42 AM

Hello,
I'm trying to use continuous deployment mode and each commit to master to increase the patch version.
This is failing due to tag pushed by AppVeyor is of "major.minor.patch.buildNuber" and I'm not sure how to get rid of the last part.
GitVersion file: https://github.com/paolosalvatori/ServiceBusExplorer/blob/master/GitVersion.yml
AppVeyor file: https://github.com/paolosalvatori/ServiceBusExplorer/blob/master/appveyor.yml

  1. 1 Posted by Ilya Finkelshte... on May 01, 2017 @ 10:38 PM

    Ilya Finkelshteyn's Avatar

    Hi Sean,

    Could you please check tag name setting? You can hard-code it or use environment variables to combine what you need.

    I hope I understand your issue correctly. Let us know if this helps.

    Ilya.

  2. 2 Posted by Sean Feldman on May 02, 2017 @ 06:56 AM

    Sean Feldman's Avatar

    Hi Ilya,

    Thank you for the link. Release every tag build is the option I'm after. Unfortunately, rather than pushing my tag created by GitVersion, the tag pushed by AppVeyor is set to "major.minor.patch.build.number" (e.g. 4.0.83.build.161). Ideally, I'd like to see AppVeyor pushing just "major.minor.patch" (e.g. 4.0.83).

  3. 3 Posted by Ilya Finkelshte... on May 02, 2017 @ 11:54 PM

    Ilya Finkelshteyn's Avatar

    Hi Sean,

    By default AppVeyor uses value of appveyor_build_version variable. GitVersion sets this value to what you see. You can check it by adding echo %appveyor_build_version% before and after gitversion command.

    So you have 2 options:
    - make gitversion generate version you need - fix gitversion-generated value by creating new variable with unneeded part cut, like $env:myVar = [System.String]::Join(".", $env:appveyor_build_version.Split("."), 0, 3) and then use that myVar as tag in GitHub publishing settings.

    Ilya.

  4. 4 Posted by Sean Feldman on May 03, 2017 @ 05:11 AM

    Sean Feldman's Avatar

    Hi Ilya,

    Thank you again. What I've done is the following:

    deploy:
      - provider: GitHub
        tag: $(GitVersion_MajorMinorPatch)
        on:
          branch: master

    This gets the format I need w/o additional PS tweaks since GitVersion sets
    that environment variable OOTB.

    Thank you again.

    Kind regards,
    Sean Feldman

  5. 5 Posted by Ilya Finkelshte... on May 03, 2017 @ 04:19 PM

    Ilya Finkelshteyn's Avatar

    Oh, great, this is much more clean! I added this to my notes (not familiar with GitVersion yet).

    Ilya.

  6. Ilya Finkelshteyn closed this discussion on Aug 25, 2018 @ 02:16 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