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

Improve setup scripts, documentation #333

Merged
merged 3 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion EasyPost.Tests/EasyPost.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@
<!-- CS8603: Possible null reference return -->
<!-- CS8604: Possible null reference argument -->
<!-- CS8618: Non-nullable field is uninitialized -->
<!-- CS8625: Cannot convert null literal to non-nullable reference or unconstrained type parameter -->
<!-- CS8765: Uninitialized field(s) -->
<!-- CS8767: Nullable parameter -->
<!-- CS0659: Missing GetHashCode override -->
<!-- CS0618: Obselete method -->
<NoWarn>CS8600;CS8602;CS8603;CS8604;CS8618;CS8765;CS8767;CS0659;CS0618</NoWarn>
<NoWarn>CS8600;CS8602;CS8603;CS8604;CS8618;CS8625;CS8765;CS8767;CS0659;CS0618</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 6 additions & 0 deletions nuget.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<activePackageSource>
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
</activePackageSource>
</configuration>
5 changes: 5 additions & 0 deletions scripts/dependencies.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
7z.exe,1CNp7hK2e6sOg1rdB8f0iEr6CWAPAj1JD
nuget.exe,1GdqLDyLiavrJ7A8IYSbGDJmRQQA-ld6n
signtool.exe,1R2Ozruv6b67wVzHd6pzuS7snkJuUqB3N
sn.exe,1kN-pj2D_PnbRqWuXgBbC6fy7k39Zpo94
SnInstallPfx.exe,1QznnBIj4cKDLDSdYTQEAuC6SDzaqoXnP
9 changes: 4 additions & 5 deletions scripts/setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,8 @@
SET NetVersions=Current 6.0 5.0 3.1
SET InstallPath=C:\dotnet

:: Dependencies for these scripts
SET DepFiles=SnInstallPfx.exe nuget.exe 7z.exe
SET FileHost=https://files.nateharr.is/netdeps/
:: Dependency file
SET DependencyFile=scripts\dependencies.txt

:: Install each .NET version
@ECHO Installing .NET SDKs ...
Expand All @@ -29,9 +28,9 @@ ENDLOCAL
:: Download dependencies to the same directory as 'dotnet'
@ECHO Downloading third-party tools ...
SETLOCAL
for %%x IN (%DepFiles%) DO (
for /f "tokens=1-2 delims=," %%x in (%DependencyFile%) DO (
@ECHO Downloading %%x ...
powershell -NoProfile -ExecutionPolicy unrestricted -Command "Invoke-WebRequest -Uri '%FileHost%%%x' -OutFile '%InstallPath%\%%x'"
powershell -NoProfile -ExecutionPolicy unrestricted -Command "Invoke-WebRequest -Uri 'https://drive.google.com/uc?export=download&id=%%y' -OutFile '%InstallPath%\%%x'"
)
ENDLOCAL

Expand Down
3 changes: 2 additions & 1 deletion scripts/sign_dlls.bat
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ SET containerName=%3
@ECHO Signing DLLs with certificate...
FOR /R "lib" %%F IN (*.dll) DO (
REM We need to run the DLLs through both sn.exe and signtool to get complete the signing process
sn -Rca "%%F" %containerName% || GOTO :commandFailed
REM sn erroneously triggers command failed if we put a fallback on this
sn -Rca "%%F" %containerName%
signtool sign /f %certFile% /p %certPass% /v /tr http://timestamp.digicert.com?alg=sha256 /td SHA256 /fd SHA256 "%%F" || GOTO :commandFailed
)

Expand Down