assembly info patching

cedd's Avatar

cedd

08 Jan, 2020 01:46 PM

Hi There

I have started using assembly info patching and I am basically very happy with it.

However, I would like to know how the version number is worked out, please could you let me know?

And it would be good to be able to incorporate one of the automatic semantic versioning things (They tend to work off pull requests and commit messages I think).

Thanks

Cedd

  1. Support Staff 1 Posted by Feodor Fitsner on 09 Jan, 2020 04:35 AM

    Feodor Fitsner's Avatar

    Hi Cedd,

    Take a look at this section about build versioning: https://www.appveyor.com/docs/build-configuration/#build-versioning

    For semantic versioning you may want to look at GitVersion: https://github.com/GitTools/GitVersion

  2. 2 Posted by cedd on 09 Jan, 2020 10:49 AM

    cedd's Avatar

    Cool, so the assemblyinfo patching version (`{version}`), can be specified in the appveyor.yml with:

    ```yaml
    version: '1.0.{build}'
    ```

    And if I wanted to use GitVersion, how would I set `{version}`? I think it is an environment variable, so could I set that in init, assuming that init happens before the assembly patching?

  3. Support Staff 3 Posted by Feodor Fitsner on 09 Jan, 2020 06:17 PM

    Feodor Fitsner's Avatar

    In the version format expression you can use any environment variable. Therefore you can define a new variable with version during install phase which runs after clone and before assembly patching, example pseudo-yaml:

    install:
    - GitVersion ...
    - ps: $env:MY_VERSION = ...
    
    assembly_info:
      patch: true
      assembly_version: '${MY_VERSION}'
    
  4. 4 Posted by cedd on 10 Jan, 2020 09:21 AM

    cedd's Avatar

    Thanks feodor, thats very helpful ...

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

Recent Discussions

07 Jul, 2020 06:21 PM
07 Jul, 2020 03:15 PM
05 Jul, 2020 02:33 AM
03 Jul, 2020 07:29 PM
03 Jul, 2020 03:53 AM

 

02 Jul, 2020 09:09 PM
02 Jul, 2020 03:24 PM
01 Jul, 2020 01:12 PM
30 Jun, 2020 04:26 PM
25 Jun, 2020 05:54 PM
24 Jun, 2020 08:11 AM