-
Notifications
You must be signed in to change notification settings - Fork 25
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
Version not extracted from BuildNumber with regex #96
Comments
This is still an issue. |
Looking at this further I believe the issue is due to line 128 in index.ts. informationalVersion should be set using the regex matched version like how it is done with version and fileVersion i.e. const informationalVersion = model.informationalVersion.match(regex.version);
const informationalVersionValue = informationalVersion && informationalVersion [0] || '';`
model.informationalVersion = utils.setWildcardVersionNumber(informationalVersionValue, model.verBuild, model.verRelease); Would you like a PR raising with this fix? |
The version number will be extracted from the build number format however this is only true for the The Additional information surrounding this functionality can be found on the following issues: #49, #24, #68 You can read more about the fields here:
I can see how the Wiki is misleading around this functionality and I will aim to get this updated a.s.a.p. Apologies for any confusion this has caused. |
Off the top of my head the only way to overcome the issue you're both facing would be changing your build number format, for example:
This approach will ensure your build name includes the version number that's set in your assemblies and your Informational Version will contain the version number only. |
@BMuuN If you set informational version to something that contains text the following error is thrown when running dotnet restore
I managed to get around it by writing a powershell script to strip the build name, assign this to a pipeline variable and then use that in the task to set the informational version. |
That error is thrown when Can you double check the task output to ensure the Assembly Info task version is v2.0.73 |
Closing as this is a non-issue as mentioned above. |
Just installed this promissing extension and I like how it works. I was already moving into an advanced scenario with build numbers.
I have a build number format
$(Build.DefinitionName)_2.1$(rev:.r).0
that results in a build number like this:NatchSandbox-Deploy-Linux_2.1.2.0
According to the WIKI, I was expecting the extension to extract 2.1.2.0 from that, but it took the whole build number instead. Did I misread or am I doing something wrong?
I checked the regex in the source and I don't really see an issue. I also tried without the trailing
.0
.The text was updated successfully, but these errors were encountered: