Skip to content

Commit aa97d0e

Browse files
authored
fix: Packages must start with GeneXus prefix. (#1194)
* Packages must start with `GeneXus` prefix. Rename packages that starts with "Gam" as "GeneXus.AccessManager" * Added validation on package names.
1 parent fa7c7f4 commit aa97d0e

File tree

7 files changed

+36
-6
lines changed

7 files changed

+36
-6
lines changed

.github/workflows/Build.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,36 @@ jobs:
122122
- name: Pack
123123
run: dotnet pack $Env:SolutionFile --no-restore --no-build --configuration $Env:Configuration /p:Version=$Env:NUGET_PACKAGE_VERSION
124124

125+
- name: Validate package names
126+
run: |
127+
Write-Output "Validating package names for NuGet.org publication..."
128+
Write-Output "All packages must start with 'GeneXus.' prefix as this namespace is reserved for GeneXus on NuGet.org"
129+
Write-Output ""
130+
131+
$invalidPackages = @()
132+
Get-ChildItem ".\dotnet\*.nupkg" -Recurse | ForEach-Object {
133+
$packageName = [System.IO.Path]::GetFileNameWithoutExtension($_.Name)
134+
# Remove version suffix to get the actual package name
135+
$actualPackageName = $packageName -replace '\.\d+\.\d+\.\d+.*$', ''
136+
137+
if (-not $actualPackageName.StartsWith("GeneXus.")) {
138+
$invalidPackages += $_.Name
139+
Write-Warning "Package '$($_.Name)' does not start with 'GeneXus.'"
140+
} else {
141+
Write-Output "✓ Package '$($_.Name)' correctly starts with 'GeneXus.'"
142+
}
143+
}
144+
145+
if ($invalidPackages.Count -gt 0) {
146+
Write-Output ""
147+
Write-Error "Validation failed: The following packages do not start with 'GeneXus.': $($invalidPackages -join ', ')"
148+
Write-Error "This validation is required for publishing to NuGet.org where the 'GeneXus' prefix is reserved."
149+
exit 1
150+
}
151+
152+
Write-Output ""
153+
Write-Output "✅ All packages correctly start with 'GeneXus.' prefix - ready for NuGet.org publication"
154+
125155
- name: Sign packages
126156
if: github.repository_owner == 'GeneXusLabs' && steps.buildVariables.outputs.SHOULD_DEPLOY == 'true'
127157
env:

dotnet/src/extensions/gam/src/DotNet/GamSaml20Net/GamSaml20Net.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<AssemblyName>GamSaml20NetImpl</AssemblyName>
66
<Version>17.4.0</Version>
77
<NoWarn>CA1031, CA1801, SYSLIB0027</NoWarn>
8-
<PackageId>Gam.Saml20.Net</PackageId>
8+
<PackageId>GeneXus.AccessManager.Saml20.Net</PackageId>
99
</PropertyGroup>
1010
<PropertyGroup>
1111
<DefineConstants>NETCORE</DefineConstants>

dotnet/src/extensions/gam/src/DotNet/GamTotpNet/GamTotpNet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<AssemblyName>GamTotpNetImpl</AssemblyName>
66
<Version>17.4.0</Version>
77
<NoWarn>CA1031, CA1801, SYSLIB0027</NoWarn>
8-
<PackageId>Gam.Totp.Net</PackageId>
8+
<PackageId>GeneXus.AccessManager.Totp.Net</PackageId>
99
</PropertyGroup>
1010

1111
<PropertyGroup>

dotnet/src/extensions/gam/src/DotNet/GamUtilsNet/GamUtilsNet.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<AssemblyName>GamUtilsNetImpl</AssemblyName>
66
<Version>17.4.0</Version>
77
<NoWarn>CA1031, CA1801, SYSLIB0027</NoWarn>
8-
<PackageId>Gam.Utils.Net</PackageId>
8+
<PackageId>GeneXus.AccessManager.Utils.Net</PackageId>
99
</PropertyGroup>
1010

1111
<PropertyGroup>

dotnet/src/extensions/gam/src/DotNetFramework/GamSaml20/GamSaml20.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<RootNamespace>GamSaml20</RootNamespace>
55
<AssemblyName>GamSaml20Impl</AssemblyName>
66
<NoWarn>CA1031, CA1801, CA1724</NoWarn>
7-
<PackageId>Gam.Saml20</PackageId>
7+
<PackageId>GeneXus.AccessManager.Saml20</PackageId>
88
</PropertyGroup>
99
<ItemGroup>
1010
<PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0" />

dotnet/src/extensions/gam/src/DotNetFramework/GamTotp/GamTotp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<TargetFramework>net462</TargetFramework>
44
<AssemblyName>GamTotpImpl</AssemblyName>
55
<NoWarn>CA1031, CA1801</NoWarn>
6-
<PackageId>Gam.Totp</PackageId>
6+
<PackageId>GeneXus.AccessManager.Totp</PackageId>
77
</PropertyGroup>
88
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
99
<Optimize>True</Optimize>

dotnet/src/extensions/gam/src/DotNetFramework/GamUtils/GamUtils.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<TargetFramework>net462</TargetFramework>
44
<AssemblyName>GamUtilsImpl</AssemblyName>
55
<NoWarn>CA1031, CA1801</NoWarn>
6-
<PackageId>Gam.Utils</PackageId>
6+
<PackageId>GeneXus.AccessManager.Utils</PackageId>
77
</PropertyGroup>
88
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
99
<Optimize>True</Optimize>

0 commit comments

Comments
 (0)