Skip to content

Commit d1dad1c

Browse files
Snow 991583 strong assembly sign (#987)
### Description .NET driver signing assembly with strong name ### Checklist - [ ] Code compiles correctly - [ ] Code is formatted according to [Coding Conventions](../blob/master/CodingConventions.md) - [ ] Created tests which fail without the change (if possible) - [ ] All tests passing (`dotnet test`) - [ ] Extended the README / documentation, if necessary - [ ] Provide JIRA issue id (if possible) or GitHub issue id in PR name
1 parent 8d02022 commit d1dad1c

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

deploy.bat

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
REM Scripts to build .net driver and deploy
22
SET VERSION=%1
33
SET API_KEY=%2
4+
SET SNKEY=%3
45

56
SET ROOT_DIR=%~dp0
67
cd %ROOT_DIR%
78

8-
dotnet build Snowflake.Data\Snowflake.Data.csproj -c Release --force -v n
9+
echo -----BEGIN CERTIFICATE----- > %WORKSPACE%\coded.txt
10+
echo %SNKEY% >> %WORKSPACE%\coded.txt
11+
echo -----END CERTIFICATE----- >> %WORKSPACE%\coded.txt
912

10-
REM command to sign with strong name Snowflake.Data.dll should be here
13+
certutil -decode %WORKSPACE%\coded.txt %WORKSPACE%\key.snk
14+
15+
dotnet build Snowflake.Data\Snowflake.Data.csproj -c Release --force -v n /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=%WORKSPACE%\key.snk
16+
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64"\sn.exe -v %WORKSPACE%"\Snowflake.Data\bin\Release\netstandard2.0\Snowflake.Data.dll"
1117

1218
dotnet pack Snowflake.Data\Snowflake.Data.csproj -c Release --force -v n --no-build --output %ROOT_DIR%
1319

14-
dotnet nuget push Snowflake.Data.%VERSION%.nupkg -k %API_KEY% -s https://api.nuget.org/v3/index.json
20+
dotnet nuget push Snowflake.Data.%VERSION%.nupkg -k %API_KEY% -s https://api.nuget.org/v3/index.json

0 commit comments

Comments
 (0)