Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sanitize version attribute #419

Closed
ptr727 opened this issue Jan 16, 2019 · 2 comments
Closed

Sanitize version attribute #419

ptr727 opened this issue Jan 16, 2019 · 2 comments

Comments

@ptr727
Copy link

ptr727 commented Jan 16, 2019

Azure DevOps Extension you are using

Version .NET Core Assemblies

Where are you running it?

Azure DevOps

Version of Extension/Task

Public, 2.*

Expected behaviour and actual behaviour

  1. Expected, by default only the attribute.
    Actual, replace all attributes, resulting in manifest version that is not compliant.
  2. Sanitize input or make instructions of use clear.
    Used "" as "The version field to update"
    End result was malformed CSPROJ where " < < version > > " tag was added. (spaces added for github)

Steps to reproduce the problem

Use "$(Build.BuildNumber)" as "Version Number", all versions changed to "1.1.20190116.11", broken build, due to assembly version being in wrong format.
Set "The version field to update" to " < version > ", broken build, " < < version > > " tag inserted.

Suggestion to fix:

  • Make the default behavior to only update the " < version > " field, not all fields, i.e. set the "The version field to update" value to "Version" by default.
  • Update instructions to make it clear that the "The version field to update" needs to be without < >, i.e. "version", not " < version > "
  • Add ability to specify multiple fields to update. I want to leave the assembly version alone, but update the < version > and < fileversion > fields. Allow input of e.g. "Version;FileVersion", to have both tags replaced.

(Had to add spaces around brackets else markdown styling obscures them)

@rfennell
Copy link
Owner

Thanks for the suggestions. I never like changing current default behavior as I don't know how it will effect people (unless I do a major version update, which I think is a bit much for this)

The second option is a good idea short term (a wiki change I have don't now, the readme will be update in a future release), with the third as a good enhancement.

@rfennell
Copy link
Owner

After more though I think it is better to run to task multiple time for multiple fields.

So I am going to close this issue and leave with with a WIKI update. It can be re-opened if needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants