GitHub tag created with .buildNumber
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
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
1 Posted by Ilya Finkelshte... on May 01, 2017 @ 10:38 PM
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 Posted by Sean Feldman on May 02, 2017 @ 06:56 AM
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 Posted by Ilya Finkelshte... on May 02, 2017 @ 11:54 PM
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 aftergitversion
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 thatmyVar
astag
in GitHub publishing settings.Ilya.
4 Posted by Sean Feldman on May 03, 2017 @ 05:11 AM
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 Posted by Ilya Finkelshte... on May 03, 2017 @ 04:19 PM
Oh, great, this is much more clean! I added this to my notes (not familiar with GitVersion yet).
Ilya.
Ilya Finkelshteyn closed this discussion on Aug 25, 2018 @ 02:16 AM.