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

(#770) Clarify Package Environment variables and their contents #764

Merged
merged 4 commits into from
Jul 25, 2023

Conversation

corbob
Copy link
Member

@corbob corbob commented Jun 27, 2023

Description Of Changes

Add a note to the upgrade guide for Package Maintainers to be aware that the ChocolateyPackageVersion is normalized in Chocolatey CLI Version 2.0.0. Add some clarifying words around the ChocolateyPackageName variable that it is a lower case version of the id.

Motivation and Context

The normalization of Version numbers could behave differently depending on the package scripts. There used to be at least one package that expected ChocolateyPackageName to exactly match the nuspec file and it didn't work when the casing was changed.

Testing

  • I have previewed these changes using the Docker Container or another method before submitting this pull request.

Change Types Made

  • Minor documentation fix (typos etc.).
  • Major documentation change (refactoring, reformatting or adding documentation to existing page).
  • New documentation page added.
  • The change I have made should have a video added, and I have raised an issue for this.
    • Issue #

Change Checklist

  • Requires a change to menu structure (top or left hand side)/
  • Menu structure has been updated

Related Issue

@corbob corbob requested review from gep13 and pauby June 27, 2023 23:09
input/en-us/create/functions/index.md Outdated Show resolved Hide resolved
input/en-us/guides/upgrading-to-chocolatey-v2-v6.md Outdated Show resolved Hide resolved
@corbob corbob changed the title Clarify Package Environment variables and their contents (#770) Clarify Package Environment variables and their contents Jul 14, 2023
@corbob corbob requested review from vexx32 and removed request for gep13 July 14, 2023 14:39
Copy link
Member

@vexx32 vexx32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple things, but otherwise this looks good :3

input/en-us/create/functions/index.md Outdated Show resolved Hide resolved
input/en-us/guides/upgrading-to-chocolatey-v2-v6.md Outdated Show resolved Hide resolved
vexx32
vexx32 previously approved these changes Jul 19, 2023
@vexx32 vexx32 requested a review from pauby July 19, 2023 14:50
input/en-us/create/functions/index.md Outdated Show resolved Hide resolved
input/en-us/create/functions/index.md Outdated Show resolved Hide resolved
input/en-us/create/functions/index.md Outdated Show resolved Hide resolved
input/en-us/create/functions/index.md Outdated Show resolved Hide resolved
input/en-us/create/functions/index.md Outdated Show resolved Hide resolved
pauby
pauby previously approved these changes Jul 20, 2023
Copy link
Member

@pauby pauby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work @corbob. Thanks for persevering.

@gep13
Copy link
Member

gep13 commented Jul 25, 2023

In order to get this one over the line, I am going to get it rebased to fix up the merge conflict, and then get it merged. This is based on the fact that @pauby has already approved it.

If Package Maintainers use the ChocolateyPackageVersion environment
variable, and the version number is not normalized, then this could lead
to undesired package results. This commit adds a note to the upgrade
guide regarding this and cautioning package maintainers from using this.
Update the Environment Variable information to note that
ChocolateyPackageName is lower case, and that ChocolateyPackageVersion
is normalized.
Copy link
Member

@gep13 gep13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@gep13 gep13 enabled auto-merge July 25, 2023 06:53
@gep13 gep13 merged commit ec0140d into chocolatey:master Jul 25, 2023
1 check passed
choco-bot pushed a commit that referenced this pull request Jul 25, 2023
Merge pull request #764 from corbob/package-variables

(#770) Clarify Package Environment variables and their contents
@corbob corbob deleted the package-variables branch September 19, 2023 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make recommendations on the use of $env:ChocolateyPackageVersion in packages
5 participants