forked from chocolatey/choco
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(chocolatey#3174) Store non-normalized package version
In a previous change we normalized all versions that was being used in Chocolatey CLI. This caused certain packages that uses non-normalized version numbers to start failing to look up additional information in other products. To work around this problem we need to store the non-normalized version of the package when scripts are being ran. This is done by adding a new environment variable that can be used, this environment variable is considered private and is not for public consumption.
- Loading branch information
1 parent
e12f5fb
commit b810acb
Showing
5 changed files
with
99 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
// Copyright © 2023-Present Chocolatey Software, Inc | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
namespace chocolatey | ||
{ | ||
using System.ComponentModel; | ||
|
||
public static class StringResources | ||
{ | ||
/// <summary> | ||
/// Resources for the names of available environment variables | ||
/// that will be created or used as part of executing | ||
/// Chocolatey CLI. | ||
/// </summary> | ||
/// <remarks> | ||
/// DEV NOTICE: Mark anything that is not meant for public consumption as | ||
/// internal constants and not browsable, even if used in other projects. | ||
/// </remarks> | ||
public static class EnvironmentVariables | ||
{ | ||
/// <summary> | ||
/// The version of the package that is being handled as it is defined in the embedded | ||
/// nuspec file. | ||
/// </summary> | ||
/// <remarks> | ||
/// Will be sets during package installs, upgrades and uninstalls. | ||
/// Environment variable is only for internal uses. | ||
/// </remarks> | ||
/// <seealso cref="PackageNuspecVersion" /> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
[Browsable(false)] | ||
internal const string ChocolateyPackageNuspecVersion = "chocolateyPackageNuspecVersion"; | ||
|
||
/// <summary> | ||
/// The version of the package that is being handled as it is defined in the embedded | ||
/// nuspec file. | ||
/// </summary> | ||
/// <remarks> | ||
/// Will be sets during package installs, upgrades and uninstalls. | ||
/// Environment variable is only for internal uses. | ||
/// </remarks> | ||
/// <seealso cref="ChocolateyPackageNuspecVersion" /> | ||
[EditorBrowsable(EditorBrowsableState.Never)] | ||
[Browsable(false)] | ||
internal const string PackageNuspecVersion = "packageNuspecVersion"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters