mirror of
https://github.com/MaaAssistantArknights/MaaAssistantArknights.git
synced 2026-07-20 10:57:45 +08:00
update
This commit is contained in:
8
src/MaaWpfGui/Directory.Build.props
Normal file
8
src/MaaWpfGui/Directory.Build.props
Normal file
@@ -0,0 +1,8 @@
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<AssemblyVersion>4.25.1</AssemblyVersion>
|
||||
<FileVersion>4.25.1</FileVersion>
|
||||
<InformationalVersion>v4.25.1-alpha.1.d009.ga3f04669d</InformationalVersion>
|
||||
<Version>4.25.1</Version>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -1,4 +1,8 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Target Name="TaggifyVersion" BeforeTargets="Build">
|
||||
<Exec Command="powershell ./TaggifyVersion.ps1" />
|
||||
<Message Text="Taggify Version" Importance="High" />
|
||||
</Target>
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<RootNamespace>MaaWpfGui</RootNamespace>
|
||||
|
||||
12
src/MaaWpfGui/TaggifyVersion.ps1
Normal file
12
src/MaaWpfGui/TaggifyVersion.ps1
Normal file
@@ -0,0 +1,12 @@
|
||||
$tag = (Invoke-Expression "git describe --abbrev=0 --tags") -replace '.*?/', ''
|
||||
$tag -match '\d+(\.\d+){0,3}'
|
||||
$match = $Matches[0]
|
||||
$props = "<Project>
|
||||
<PropertyGroup>
|
||||
<AssemblyVersion>$match</AssemblyVersion>
|
||||
<FileVersion>$match</FileVersion>
|
||||
<InformationalVersion>$tag</InformationalVersion>
|
||||
<Version>$match</Version>
|
||||
</PropertyGroup>
|
||||
</Project>"
|
||||
Set-Content -Path Directory.Build.props -Value $props
|
||||
@@ -1,4 +1,4 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<PropertyGroup>
|
||||
<Configurations>RelWithDebInfo;Release;Debug</Configurations>
|
||||
<Platforms>x64;ARM64</Platforms>
|
||||
@@ -20,8 +20,4 @@
|
||||
<Copy SourceFiles="@(MaaResourceFiles)" DestinationFiles="$(MSBuildProjectDirectory)\..\..\$(Platform)\$(Configuration)\resource\%(RecursiveDir)%(Filename)%(Extension)" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />
|
||||
<Copy SourceFiles="@(MaaPythonBinding)" DestinationFiles="$(MSBuildProjectDirectory)\..\..\$(Platform)\$(Configuration)\Python\%(RecursiveDir)%(Filename)%(Extension)" SkipUnchangedFiles="true" UseHardlinksIfPossible="true" />
|
||||
</Target>
|
||||
<Target Name="TaggifyVersion" BeforeTargets="Build">
|
||||
<Exec Command="powershell ./TaggifyVersion.ps1" />
|
||||
<Message Text="Taggify Version" Importance="High" />
|
||||
</Target>
|
||||
</Project>
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
$tag = (Invoke-Expression "git describe --abbrev=0 --tags") -replace '.*?/', ''
|
||||
$tag -match '\d+\.\d+\.\d+'
|
||||
(Get-Content ..\MaaWpfGui\MaaWpfGui.csproj) |
|
||||
ForEach-Object {
|
||||
$_ -replace '(?<a>(<(Assembly|File)Version>)).*?(?<b>(</(Assembly|File)Version>))', ('${a}' + $Matches[0] + '${b}')`
|
||||
-replace '(?<a>(<InformationalVersion>)).*?(?<b>(</InformationalVersion>))', ('${a}' + $tag + '${b}')
|
||||
} |
|
||||
Set-Content ..\MaaWpfGui\MaaWpfGui.csproj
|
||||
Reference in New Issue
Block a user