Skip to content

Commit

Permalink
Fixed build scripts.
Browse files Browse the repository at this point in the history
  • Loading branch information
lextm committed Sep 3, 2021
1 parent 15bb212 commit 601762d
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 8 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ T4MVC.cs
/.vs
*.vspscc
*.vssscc
nuget.exe
2 changes: 1 addition & 1 deletion SharpSnmpLib/SharpSnmpLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@
</None>
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition=" '$(OS)' == 'Windows_NT' ">
<Exec Command="powershell -file ..\sign.assembly.ps1 &quot;$(TargetPath)&quot;" />
<Exec Command="powershell -ExecutionPolicy Bypass -file ..\sign.assembly.ps1 &quot;$(TargetPath)&quot;" />
</Target>
</Project>
2 changes: 1 addition & 1 deletion build.release.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
rmdir /S /Q bin
powershell -file release.ps1
powershell -ExecutionPolicy Bypass -file release.ps1
IF %ERRORLEVEL% NEQ 0 goto failed

echo succeeded.
Expand Down
2 changes: 1 addition & 1 deletion dist.nuget.bat
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ call sign3.bat
IF %ERRORLEVEL% NEQ 0 exit /b 1
copy SharpSnmpLib\bin\Release\*.nupkg .

powershell -file sign.nuget.ps1
powershell -ExecutionPolicy Bypass -file sign.nuget.ps1
@IF %ERRORLEVEL% NEQ 0 exit /b 1
4 changes: 2 additions & 2 deletions dist.publish2nugetdotorg.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
..\nuget.exe update /self
for %%f in (.\*.nupkg) do ..\nuget.exe push %%f -Source https://www.nuget.org/api/v2/package
.\nuget.exe update /self
for %%f in (.\*.nupkg) do .\nuget.exe push %%f -Source https://www.nuget.org/api/v2/package
2 changes: 1 addition & 1 deletion release.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ catch

Install-Module VSSetup -Scope CurrentUser -Force
Update-Module VSSetup
$instance =Get-VSSetupInstance -All | Select-VSSetupInstance -Latest
$instance = Get-VSSetupInstance -All -Prerelease | Select-VSSetupInstance -Latest
$installDir = $instance.installationPath
Write-Host "Found VS in " + $installDir
$msBuild = $installDir + '\MSBuild\Current\Bin\MSBuild.exe'
Expand Down
8 changes: 6 additions & 2 deletions sign.nuget.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
$nuget = "..\nuget.exe"
& $nuget update /self | Write-Debug
$nuget = ".\nuget.exe"

if (!(Test-Path $nuget))
{
Invoke-WebRequest https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -OutFile nuget.exe
}

Write-Host "Sign NuGet packages."
& $nuget sign *.nupkg -CertificateSubjectName "Yang Li" -Timestamper http://timestamp.digicert.com | Write-Debug
Expand Down

0 comments on commit 601762d

Please sign in to comment.