This is an automated email from the ASF dual-hosted git repository. Cole-Greer pushed a commit to branch remove-mono in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 5c6d3d48535deca5de94925dec0e8cb2606e86eb Author: Cole Greer <[email protected]> AuthorDate: Wed Jul 22 11:59:35 2026 -0700 Use -Dnuget.apiKey Maven property with fail-fast check --- .../dev/developer/development-environment.asciidoc | 8 +++++--- gremlin-dotnet/src/pom.xml | 21 ++++++++++++--------- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/docs/src/dev/developer/development-environment.asciidoc b/docs/src/dev/developer/development-environment.asciidoc index ec2f7fe185..6d61443761 100644 --- a/docs/src/dev/developer/development-environment.asciidoc +++ b/docs/src/dev/developer/development-environment.asciidoc @@ -381,14 +381,16 @@ NuGet API key. First, create an account with link:https://www.nuget.org[nuget] and request that a PMC member add your account to the Gremlin.Net and the Gremlin.Net.Template package in nuget so that you can deploy. Next, generate an API key for your account on the nuget website. The old `mono nuget.exe setApiKey` approach stored the key encrypted (via Windows DPAPI) in -`NuGet.Config`, which the `dotnet` CLI cannot decrypt on Linux/macOS. Instead, set the key in the `NUGET_API_KEY` -environment variable before running `mvn deploy`, which the build passes explicitly to `dotnet nuget push --api-key`: +`NuGet.Config`, which the `dotnet` CLI cannot decrypt on Linux/macOS. Instead, supply the key with the `nuget.apiKey` +Maven property when running `mvn deploy`, which the build passes explicitly to `dotnet nuget push --api-key`: [source,text] ---- -export NUGET_API_KEY=[your-api-key] +mvn deploy -pl :gremlin-dotnet-source -Dnuget -Dnuget.apiKey=[your-api-key] ---- +If `nuget.apiKey` is not supplied, the build will fail fast with a message explaining how to set it. + To deploy JavaScript / TypeScript artifacts on the link:https://www.npmjs.com[npm registry], the release manager must set the authentication information on the ~/.npmrc file. The easiest way to do that is to use the `npm adduser` command. This must be done only once, as the auth token doesn't have an expiration date and it's stored on your file diff --git a/gremlin-dotnet/src/pom.xml b/gremlin-dotnet/src/pom.xml index 828382ea98..76e52e2df5 100644 --- a/gremlin-dotnet/src/pom.xml +++ b/gremlin-dotnet/src/pom.xml @@ -262,20 +262,23 @@ limitations under the License. <target> <!-- the NuGet API key is passed explicitly via the "api-key" option, sourced - from the NUGET_API_KEY environment variable, which must be set by the - release manager prior to running "mvn deploy -Dnuget". NuGet 7.6+ (bundled - with .NET SDK 10.0.300+) can read NUGET_API_KEY automatically without that - option, but this build currently targets .NET SDK 8.0, whose bundled NuGet - CLI predates that feature, so the option is passed explicitly. The old - "nuget.exe setApiKey" config file approach is not viable here: it encrypts - the key with Windows DPAPI, which the dotnet CLI cannot decrypt on + from the "nuget.apiKey" Maven property, which the release manager must set + with "-Dnuget.apiKey=..." when running "mvn deploy -Dnuget". NuGet 7.6+ + (bundled with .NET SDK 10.0.300+) can read a NUGET_API_KEY environment + variable automatically instead, but this build currently targets .NET SDK + 8.0, whose bundled NuGet CLI predates that feature. The old + "nuget.exe setApiKey" config file approach is not viable here either: it + encrypts the key with Windows DPAPI, which the dotnet CLI cannot decrypt on Linux/macOS release hosts. --> + <fail unless="nuget.apiKey"> +Deploying to NuGet requires an API key. Please supply one with "-Dnuget.apiKey=[your-api-key]" when running "mvn deploy -Dnuget". + </fail> <exec executable="dotnet" failonerror="true"> - <arg line="nuget push Gremlin.Net/bin/Gremlin.Net.${project.version}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${env.NUGET_API_KEY}"/> + <arg line="nuget push Gremlin.Net/bin/Gremlin.Net.${project.version}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${nuget.apiKey}"/> </exec> <exec executable="dotnet" failonerror="true"> - <arg line="nuget push Gremlin.Net.Template.${project.version}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${env.NUGET_API_KEY}"/> + <arg line="nuget push Gremlin.Net.Template.${project.version}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${nuget.apiKey}"/> </exec> </target> </configuration>
