mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-16 13:22:40 +00:00
move cmd to ps
This commit is contained in:
@@ -263,6 +263,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<PreBuildEvent>"$(SolutionDir)Scripts\update-version.cmd" "$(SolutionDir)" "$(SolutionDir)GitVersion.cs"</PreBuildEvent>
|
<PreBuildEvent>powershell -file "$(SolutionDir)Scripts\update-version.ps1"
|
||||||
|
</PreBuildEvent>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
@@ -1,10 +0,0 @@
|
|||||||
rem @echo off
|
|
||||||
cd %1
|
|
||||||
for /F "delims=" %%i in ('git describe --always --tags "--abbrev=0"') do set git_tag=%%i
|
|
||||||
for /F "delims=" %%i in ('git describe --always --tags') do set git_revision=%%i
|
|
||||||
echo // This file is generated by update-version.cmd > %2
|
|
||||||
echo. >> %2
|
|
||||||
echo using System.Reflection;>> %2
|
|
||||||
echo. >> %2
|
|
||||||
echo [assembly: AssemblyVersion("%git_tag%")]>> %2
|
|
||||||
echo [assembly: AssemblyInformationalVersion("%git_revision%")]>> %2
|
|
13
Scripts/update-version.ps1
Normal file
13
Scripts/update-version.ps1
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
$tag = git describe --always --tags "--abbrev=0"
|
||||||
|
$revision = git describe --always --tags
|
||||||
|
|
||||||
|
$text = @"
|
||||||
|
// This file is generated by update-version.ps1
|
||||||
|
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
[assembly: AssemblyVersion("$tag")]
|
||||||
|
[assembly: AssemblyInformationalVersion("$revision")]
|
||||||
|
"@
|
||||||
|
|
||||||
|
$text | Out-File $PSScriptRoot\..\GitVersion.cs -Encoding utf8
|
Reference in New Issue
Block a user