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

ReleaseNotes not showing up after publishing module #38

Open
islubin opened this issue Nov 30, 2018 · 8 comments
Open

ReleaseNotes not showing up after publishing module #38

islubin opened this issue Nov 30, 2018 · 8 comments
Labels

Comments

@islubin
Copy link

islubin commented Nov 30, 2018

We published a new version of our module and included release notes in the publish-module command. Those notes are not showing up associated with the module. Is this a known issue/is there a good workaround?

@cywang16
Copy link

cywang16 commented Dec 5, 2018

I work with @islubin for this. Right now I try to add ReleaseNotes in our manifest psd1 as follows (as ReleaseNotes variable under PSData). Do I use the right syntax?

PrivateData = @{

    PSData = @{

        # Tags applied to this module. These help with module discovery in online galleries.
        Tags = 'Office365', 'MicrosoftTeams', 'Teams'

        # A URL to the license for this module.
        LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/preview/LICENSE.txt'

        # A URL to the main website for this project.
        ProjectUri = 'https://github.com/MicrosoftDocs/office-docs-powershell/tree/master/teams'

        # A URL to an icon representing this module.
        IconUri = 'https://statics.teams.microsoft.com/evergreen-assets/apps/teamscmdlets_largeimage.png'

        # ReleaseNotes of this module
        ReleaseNotes = @('This update includes a bug fix to ensure that owners are added as members when creating the team, allows users with the appropriate permissions to create groups on behalf of another user.',
			'',
			'Additionally, at the time of publishing Global and Teams Service administrators can get and set information about all teams in the organization using all modules, and admins do not need to be licensed for Microsoft Teams to run these commands.')

    } # End of PSData hashtable

} # End of PrivateData hashtable

Our ReleaseNotes has multiple lines, so I put it as a string array with 3 elements. Will this show as 3 lines in PsGallery?

@SydneyhSmith
Copy link
Contributor

@cywang16 in PowerShell we use `n to indicate a new line within a string, I wonder if using this would solve your issue, I am guessing that the release notes are not showing properly because it not expecting an array

@cywang16
Copy link

cywang16 commented Dec 7, 2018

Update-ModuleManifest says -ReleaseNotes has type String[].

Also both of the following commands make the same result in ReleaseNotes in PSData:

Update-ModuleManifest -Path E:\Teams\powershellcmdlet\src\Microsoft.TeamsCmdlets.PowerShell.Custom\bin\Debug\MicrosoftTeams.psd1 -ReleaseNotes "Tbd`r`n`r`nTbd"

Update-ModuleManifest -Path E:\Teams\powershellcmdlet\src\Microsoft.TeamsCmdlets.PowerShell.Custom\bin\Debug\MicrosoftTeams.psd1 -ReleaseNotes @("Tbd", "", "Tbd")

PrivateData = @{

    PSData = @{

        # Tags applied to this module. These help with module discovery in online galleries.
        Tags = 'Office365','MicrosoftTeams','Teams'

        # A URL to the license for this module.
        LicenseUri = 'https://raw.githubusercontent.com/Azure/azure-powershell/preview/LICENSE.txt'

        # A URL to the main website for this project.
        ProjectUri = 'https://github.com/MicrosoftDocs/office-docs-powershell/tree/master/teams'

        # A URL to an icon representing this module.
        IconUri = 'https://statics.teams.microsoft.com/evergreen-assets/apps/teamscmdlets_largeimage.png'

        # ReleaseNotes of this module
        ReleaseNotes = 'Tbd

Tbd'

        # Prerelease string of this module
        # Prerelease = ''

        # Flag to indicate whether the module requires explicit user acceptance for install/update
        # RequireLicenseAcceptance = $false

        # External dependent modules of this module
        # ExternalModuleDependencies = @()

    } # End of PSData hashtable

 } # End of PrivateData hashtable

@SydneyhSmith
Copy link
Contributor

@cywang16 You are correct, I just looked at where this is happening in the source code and it is making that conversion, I will mark this as a bug
https://github.com/PowerShell/PowerShellGet/blob/6fc51a524110fbfccabec36af7c72ccc79ddc535/src/PowerShellGet/public/psgetfunctions/Update-ModuleManifest.ps1#L769

I am wondering if the issue might be happening in Publish-Module which makes the same conversion since it seems like Update-ModuleManifest is behaving as expected (by creating new lines), but the module is not publishing properly https://github.com/PowerShell/PowerShellGet/blob/6fc51a524110fbfccabec36af7c72ccc79ddc535/src/PowerShellGet/public/psgetfunctions/Publish-Module.ps1#L540

This was not a known issue so we will investigate, in the meantime I want to find a workaround for you, perhaps you could use the "Description" section in the manifest to publish the release notes?

@cywang16
Copy link

cywang16 commented Dec 8, 2018

@SydneyhSmith really appreciate for checking this up.

In my previous publish, psd1 manifest did not have ReleaseNotes. If I had included ReleaseNotes in psd1, does it display is PsGallery?

What does it take to fix this from our side? Does it take another publish, or can we fix our psd1 is PsGallery?

@SydneyhSmith
Copy link
Contributor

@cywang16 Yes, if you include ReleaseNotes in your publish it should display in the gallery, check out the PSGet module for an example
image
and check out their psd1 file to see how it looks

From your side it does take a new publish to fix the psd1 in the PSGallery.

@cywang16
Copy link

Thanks @SydneyhSmith

I want to keep the same version binary in PsGallery. If I publish the same version, with the updated psd1, will it overwrite what I have in PsGallery? Or will I get error for publishing the same/existing version module?

@SydneyhSmith
Copy link
Contributor

@cywang16 you will need to increment the version number in order to update the psd1

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

No branches or pull requests

3 participants