mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-30 01:07:21 +13:00
Using git command instead %git% parameter in script. If git command not exist creating empty text file.
Also added script for create empty APIKeysLocal.cs file if it is not exist.
This commit is contained in:
parent
3185442111
commit
cd8deaaeb0
4 changed files with 14 additions and 11 deletions
|
@ -521,7 +521,13 @@
|
|||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>"$(ProjectDir)prebuild.cmd" "$(ProjectDir)" "GitHash.txt"</PreBuildEvent>
|
||||
<PreBuildEvent>cd $(ProjectDir)
|
||||
|
||||
for %25%25x in (git.exe) do if not [%25%25~$PATH:x]==[] (
|
||||
git rev-parse HEAD > GitHash.txt
|
||||
) else (
|
||||
type nul > GitHash.txt
|
||||
)</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
cd %1
|
||||
if defined git (
|
||||
"%git%" rev-parse HEAD > %2
|
||||
) else (
|
||||
type nul > %2
|
||||
)
|
|
@ -25,10 +25,6 @@ You should have received a copy of the GNU General Public License
|
|||
|
||||
namespace UploadersLib
|
||||
{
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Note: For be able to compile project create empty APIKeysLocal.cs file. //
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
public static partial class APIKeys
|
||||
{
|
||||
// Image Uploaders
|
||||
|
|
|
@ -428,6 +428,13 @@
|
|||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>cd $(ProjectDir)APIKeys\
|
||||
|
||||
if not exist APIKeysLocal.cs (
|
||||
type nul > APIKeysLocal.cs
|
||||
)</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
|
Loading…
Reference in a new issue