-
Notifications
You must be signed in to change notification settings - Fork 43
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
The RealeseNote of module manifest are not update in build task #358
Comments
I can confirm I'm experiencing this with the latest version of the sampler. I haven't found a good combination of previous modules in the requirements.psd1 allows it to work consistently. Any guidance on how to get versioning to work? Workarounds? Also, when using appveyor, I'm getting the following result:
|
Someone needs to send in a PR to fix those, @NicolasBn had a suggestion how this can be fixed so it sounds like a simple change but haven’t looked into it myself. Please open a new issue for the AppVeyor problem so we can track problems individually. |
This problem seems that Sampler/.build/tasks/release.module.build.ps1 Lines 50 to 52 in d19ef07
We cannot just move the below initialization of Sampler/Sampler/scripts/Set-SamplerTaskVariable.ps1 Lines 153 to 165 in d19ef07
Sampler/Sampler/Public/Get-SamplerBuiltModuleManifest.ps1 Lines 74 to 76 in d19ef07
We could workaround this move the above code, and change the BUT, the best approach would be to remove
to something like: if ($AsNewBuild.IsPresent -or $IsChocoPackage) This change would be best so that all tasks always get the module version from the module manifest for module packages, and those packages that do not have module manifest get the version the same way as the build does, e.g. GitVersion. |
Is If no, we need to found a way to implement it. Maybe in Build.yaml? |
There is a lot of parameters in the Choco task, I'm hoping we could detect one of those in the current session by adding one of these choco parameters to the release.module.build.ps1 and that will be our "IsChocoPackage". 🙂 Sampler/.build/tasks/ChocolateyPackage.build.ps1 Lines 11 to 58 in d19ef07
For example if we would to add the following parameter to release.module.build.ps1: $ChocolateyPackageId = (property ChocolateyPackageId '') Then it should give use either a package id or
We should be able to do this: $isChocoPackage = -not ([string]::IsNullOrEmpty($ChocolateyPackageId))
if ($AsNewBuild.IsPresent -or $isChocoPackage) |
But we should really test this out on a actual choco repository so we don't break anything again trying to fix this issue 🙂 |
@gaelcolas was kind to make a test repo public: https://github.com/SynEdgy/MyChocoPackage. Though Geal has not built it for a long time so it is not certain it works with current version of Sampler without some modifications. |
So my theory in #358 (comment) did not work since |
I have sent in PR #364. Appreciate if someone here can review it. |
- The module manifest is now correctly updated with release notes from the changelog. Fixes #358
Problem description
The task 'Create_changelog_release_output' doesn't update the module manifest in build process.
You can see the problem in the module build with 0.112.1+ version of Sampler.
https://synedgy.visualstudio.com/Sampler/_build/results?buildId=1468&view=logs&j=bce26a94-9049-50eb-6c1c-385ccbec51f9&t=512e4b73-7a3e-57af-0534-ae809c1351da&l=137
the error message :
No valid manifest found for project '<moduleName>'. Cannot update the Release Notes.
The problem came from the
-AsNewBuild
parameter added toSet-SamplerTaskVariable
dot sourcing in task.Sampler/.build/tasks/release.module.build.ps1
Line 52 in a168b09
With this parameter, the
$builtModuleManifest
variable is not initiate.Verbose logs
How to reproduce
Use 0.121.1+ version of Sampler in your pipeline
Expected behavior
Release Note are added in manifest.
Current behavior
ReleaseNote are empty.
Suggested solution
Moved the initialization of
$builtModuleManifest
outside of-AsNewBuild
condition.Operating system the target node is running
PowerShell version and build the target node is running
Module version used
The text was updated successfully, but these errors were encountered: