mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-09 10:02:30 +00:00
PckStudio.csproj - Added condition to only aquire commit hash and branch name when in debug mode
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2023-present miku-666, MattNL
|
||||
/* Copyright (c) 2023-present miku-666
|
||||
* This software is provided 'as-is', without any express or implied
|
||||
* warranty. In no event will the authors be held liable for any damages
|
||||
* arising from the use of this software.
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<Target Name="GetGitHash" BeforeTargets="WriteGitInfo" Condition="'$(BuildHash)' == ''">
|
||||
<Target Name="GetGitHash" BeforeTargets="WriteGitInfo" Condition="'$(Configuration)' == 'Debug' AND '$(BuildHash)' == ''">
|
||||
<!-- write hash and branch to console.-->
|
||||
<Exec Command="git -C $(ProjectDir) describe --always" ConsoleToMsBuild="true">
|
||||
<Output TaskParameter="ConsoleOutput" PropertyName="GitHash" />
|
||||
@@ -31,7 +31,7 @@
|
||||
<BuildBranch>$(GitBranch)</BuildBranch>
|
||||
</PropertyGroup>
|
||||
</Target>
|
||||
<Target Name="WriteGitInfo" BeforeTargets="CoreCompile">
|
||||
<Target Name="WriteGitInfo" BeforeTargets="CoreCompile" Condition="'$(Configuration)' == 'Debug'">
|
||||
<!-- names the obj/.../GitAssemblyInfo.cs file -->
|
||||
<PropertyGroup>
|
||||
<GitAssemblyInfoFile>$(IntermediateOutputPath)GitAssemblyInfo.cs</GitAssemblyInfoFile>
|
||||
|
||||
Reference in New Issue
Block a user