Semver metadata not supported in Assembly Info Patching

James Toyer's Avatar

James Toyer

18 Feb, 2015 05:47 PM

So I found this really useful discussion about the ability to strip the dash and everything after it for assembly versions that don't support it. But I've run into a small problem with it.

I'm following the Semver guidelines on metadata associated with builds. This means that I should be able to do something like x.y.z+metadata. The problem is, the plus and everything after it is not stripped out, and assembly patching fails.

Short of doing something like the following (which I'm not sure event works), is there a solution to this?

environment:
    core_version: 0.16.4
  version: "$(core_version)+{branch}.{build}"
  branches:
    only:
      - master
  assembly_info:
    patch: true
    file: AssemblyInfo.*
    assembly_version: "$(core_version)"
    assembly_file_version: "$(core_version)"
    assembly_informational_version: "{version}"
  1. 1 Posted by James Toyer on 18 Feb, 2015 05:54 PM

    James Toyer's Avatar

    Ok, so that does work, but it leaves me with the rather messy $(core_version)+master.7 as the build version number :(

  2. Support Staff 2 Posted by Feodor Fitsner on 18 Feb, 2015 05:57 PM

    Feodor Fitsner's Avatar

    You mean $(core_version) is not expanded?

  3. 3 Posted by James Toyer on 18 Feb, 2015 05:58 PM

    James Toyer's Avatar

    Yeah, that's correct. It means every reference to it in the UI looks rather unhelpful

  4. Support Staff 4 Posted by Feodor Fitsner on 18 Feb, 2015 05:59 PM

    Feodor Fitsner's Avatar

    Could you drop a screenshot please?

  5. Support Staff 5 Posted by Feodor Fitsner on 18 Feb, 2015 06:00 PM

    Feodor Fitsner's Avatar

    Ah, I see what you mean - environment variables are not expanded in build version. Let me see if that scenario could be easily supported.

  6. 6 Posted by James Toyer on 18 Feb, 2015 06:01 PM

    James Toyer's Avatar

    I've attached a screen shot if that helps too

  7. Support Staff 7 Posted by Feodor Fitsner on 18 Feb, 2015 06:21 PM

    Feodor Fitsner's Avatar

    We've added support for environment variables in build version format - will deploy an update today.

  8. 8 Posted by James Toyer on 18 Feb, 2015 06:22 PM

    James Toyer's Avatar

    Awesome. Thank you :)

  9. James Toyer closed this discussion on 28 Oct, 2015 04:42 PM.

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