Remove timestamps from deps files

This commit is contained in:
John Luo 2017-05-05 16:44:26 -07:00
parent caaae2003e
commit 8366aabd59
1 changed files with 5 additions and 0 deletions

View File

@ -101,6 +101,11 @@
</Target>
<Target Name="_RemoveTimestampFromDepsFile">
<GetOSPlatform>
<!-- Returns {Linux, macOS, Windows} -->
<Output TaskParameter="PlatformName" PropertyName="OSPlatform" />
</GetOSPlatform>
<Exec Command="powershell.exe -command &quot;(Get-Content $(DepsFile)).replace('-$(BuildNumber)','-final') | Set-Content $(DepsFile)&quot;" Condition="'$(OSPlatform)'=='Windows'"/>
<Exec Command="sed -i '' -e &quot;s/\-$(BuildNumber)/\-final/g&quot; $(DepsFile)" Condition="'$(OSPlatform)'=='macOS'"/>
<Exec Command="sed -i -e &quot;s/\-$(BuildNumber)/\-final/g&quot; $(DepsFile)" Condition="'$(OSPlatform)'=='Linux'"/>