mirror of https://github.com/OpenRCT2/OpenRCT2.git
Avoid signing when build has not changed
This commit is contained in:
parent
bd006de77b
commit
a3e4bd1af4
|
@ -148,6 +148,7 @@
|
||||||
<CleanItems Include="$(ArtifactsDir)openrct2-symbols-$(Configuration)-$(Platform)*.zip" />
|
<CleanItems Include="$(ArtifactsDir)openrct2-symbols-$(Configuration)-$(Platform)*.zip" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Delete Files="@(CleanItems)" />
|
<Delete Files="@(CleanItems)" />
|
||||||
|
<Delete Files="%(SignItems.Identity).signed" />
|
||||||
<RemoveDir Directories="$(TargetDir)data" />
|
<RemoveDir Directories="$(TargetDir)data" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
@ -192,24 +193,27 @@
|
||||||
|
|
||||||
<!-- Target to sign OpenRCT2 (exe and dll)
|
<!-- Target to sign OpenRCT2 (exe and dll)
|
||||||
This requires the project parameter SIGN_PASSWORD to be set -->
|
This requires the project parameter SIGN_PASSWORD to be set -->
|
||||||
<Target Name="Sign" DependsOnTargets="Build" Inputs="@(SignItems)" Outputs="%(Identity).bogus">
|
<Target Name="Sign" AfterTargets="Build" Inputs="@(SignItems)" Outputs="%(SignItems.Identity).signed">
|
||||||
<Warning Condition="'$(SIGN_PASSWORD)'==''" Text="SIGN_PASSWORD was not set, skipping signing of %(SignItems.Filename)%(SignItems.Extension)." />
|
<Warning Condition="'$(SIGN_PASSWORD)'==''" Text="SIGN_PASSWORD was not set, skipping signing of %(SignItems.Filename)%(SignItems.Extension)." />
|
||||||
<Message Condition="'$(SIGN_PASSWORD)'!=''" Text="Signing %(SignItems.Filename)%(SignItems.Extension)"
|
<Message Condition="'$(SIGN_PASSWORD)'!=''" Text="Signing %(SignItems.Filename)%(SignItems.Extension)"
|
||||||
Importance="high" />
|
Importance="high" />
|
||||||
<Exec Condition="'$(SIGN_PASSWORD)'!=''"
|
<Exec Condition="'$(SIGN_PASSWORD)'!=''"
|
||||||
Command="signtool.exe sign /f $(SignCertificate) /p $(SIGN_PASSWORD) /t $(SignTimestampUrl) %(SignItems.Identity)"
|
Command="signtool.exe sign /f $(SignCertificate) /p $(SIGN_PASSWORD) /t $(SignTimestampUrl) %(SignItems.Identity)"
|
||||||
StandardOutputImportance="low" />
|
StandardOutputImportance="low" />
|
||||||
|
|
||||||
|
<!-- Create a dummy file so that msbuild can use it to determine if the binary is newer than the last sign time -->
|
||||||
|
<Touch AlwaysCreate="true" Files="%(SignItems.Identity).signed" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<!-- Target to publish OpenRCT2 as a portable zip -->
|
<!-- Target to publish OpenRCT2 as a portable zip -->
|
||||||
<Target Name="PublishPortable" DependsOnTargets="Build;g2;Sign" Inputs="@(PublishItems)" Outputs="$(PublishZip)">
|
<Target Name="PublishPortable" DependsOnTargets="Build;g2" Inputs="@(PublishItems)" Outputs="$(PublishZip)">
|
||||||
<MakeDir Directories="$(ArtifactsDir)" />
|
<MakeDir Directories="$(ArtifactsDir)" />
|
||||||
<Message Importance="high" Text="Creating $([System.IO.Path]::GetFileName($(PublishZip)))..." />
|
<Message Importance="high" Text="Creating $([System.IO.Path]::GetFileName($(PublishZip)))..." />
|
||||||
<_7z Output="$(PublishZip)" Inputs="@(PublishItems)" />
|
<_7z Output="$(PublishZip)" Inputs="@(PublishItems)" />
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
<!-- Target to publish the OpenRCT2 debug symbols -->
|
<!-- Target to publish the OpenRCT2 debug symbols -->
|
||||||
<Target Name="PublishSymbols" DependsOnTargets="Build;Sign" Inputs="@(SymbolItems)" Outputs="$(PublishSymbolsZip)">
|
<Target Name="PublishSymbols" DependsOnTargets="Build" Inputs="@(SymbolItems)" Outputs="$(PublishSymbolsZip)">
|
||||||
<MakeDir Directories="$(ArtifactsDir)" />
|
<MakeDir Directories="$(ArtifactsDir)" />
|
||||||
<Message Importance="high" Text="Creating $([System.IO.Path]::GetFileName($(PublishSymbolsZip)))..." />
|
<Message Importance="high" Text="Creating $([System.IO.Path]::GetFileName($(PublishSymbolsZip)))..." />
|
||||||
<_7z Output="$(PublishSymbolsZip)" Inputs="@(SymbolItems)" />
|
<_7z Output="$(PublishSymbolsZip)" Inputs="@(SymbolItems)" />
|
||||||
|
@ -217,7 +221,7 @@
|
||||||
|
|
||||||
<!-- Target to publish the OpenRCT2 as an NSIS installer -->
|
<!-- Target to publish the OpenRCT2 as an NSIS installer -->
|
||||||
<Target Name="PublishInstaller"
|
<Target Name="PublishInstaller"
|
||||||
DependsOnTargets="Build;Sign;g2"
|
DependsOnTargets="Build;g2"
|
||||||
Inputs="@(PublishItems);$(NsisScript)"
|
Inputs="@(PublishItems);$(NsisScript)"
|
||||||
Outputs="$(PublishInstallerExe)"
|
Outputs="$(PublishInstallerExe)"
|
||||||
Condition="'$(NO_NSIS)'!='true'">
|
Condition="'$(NO_NSIS)'!='true'">
|
||||||
|
|
Loading…
Reference in New Issue