Skip to content

Commit e7cdf5e

Browse files
committed
Merge pull request #573 from GitTools/loadLibGitFromFiles
Load lib git from files
2 parents f7286e2 + b660f90 commit e7cdf5e

File tree

16 files changed

+104
-102
lines changed

16 files changed

+104
-102
lines changed

build/Build.cmd

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ set src=%~dp0..\src\
77

88
"%SystemDrive%\Windows\Microsoft.NET\Framework\%framework%\MSBuild.exe" "%src%GitVersion.sln"
99

10-
copy "%~dp0NuGetCommandLineBuild\tools\GitVersion.exe" "%tmp%GitVersion.exe"
10+
rmdir /s /q "%tmp%GitVersion"
11+
md "%tmp%GitVersion"
1112

12-
"%tmp%GitVersion.exe" /l console /output buildserver /updateAssemblyInfo /proj "%src%GitVersion.sln"
13+
xcopy /E "%~dp0NuGetCommandLineBuild\tools" "%tmp%GitVersion"
14+
15+
"%tmp%GitVersion\GitVersion.exe" /l console /output buildserver /updateAssemblyInfo /proj "%src%GitVersion.sln"
16+
17+
rmdir /s /q "%tmp%GitVersion"

src/GitVersionCore.Tests/GitVersionCore.Tests.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\LibGit2Sharp.0.20.1.0\build\net40\LibGit2Sharp.props" Condition="Exists('..\packages\LibGit2Sharp.0.20.1.0\build\net40\LibGit2Sharp.props')" />
3+
<Import Project="..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props" Condition="Exists('..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props')" />
44
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
55
<PropertyGroup>
66
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -13,7 +13,7 @@
1313
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
1515
<TargetFrameworkProfile />
16-
<NuGetPackageImportStamp>51c9a471</NuGetPackageImportStamp>
16+
<NuGetPackageImportStamp>0d617a3a</NuGetPackageImportStamp>
1717
</PropertyGroup>
1818
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1919
<DebugSymbols>true</DebugSymbols>
@@ -52,9 +52,9 @@
5252
<HintPath>..\packages\FluentDateTime.1.12.0\Lib\NET35\FluentDateTime.dll</HintPath>
5353
<Private>True</Private>
5454
</Reference>
55-
<Reference Include="LibGit2Sharp, Version=0.20.1.0, Culture=neutral, processorArchitecture=MSIL">
56-
<SpecificVersion>False</SpecificVersion>
57-
<HintPath>..\packages\LibGit2Sharp.0.20.1.0\lib\net40\LibGit2Sharp.dll</HintPath>
55+
<Reference Include="LibGit2Sharp, Version=0.21.0.176, Culture=neutral, processorArchitecture=MSIL">
56+
<HintPath>..\packages\LibGit2Sharp.0.21.0.176\lib\net40\LibGit2Sharp.dll</HintPath>
57+
<Private>True</Private>
5858
</Reference>
5959
<Reference Include="Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
6060
<HintPath>..\packages\Mono.Cecil.0.9.6.1\lib\net45\Mono.Cecil.dll</HintPath>
@@ -209,8 +209,8 @@
209209
<PropertyGroup>
210210
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
211211
</PropertyGroup>
212-
<Error Condition="!Exists('..\packages\LibGit2Sharp.0.20.1.0\build\net40\LibGit2Sharp.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.0.20.1.0\build\net40\LibGit2Sharp.props'))" />
213212
<Error Condition="!Exists('..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets'))" />
213+
<Error Condition="!Exists('..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props'))" />
214214
</Target>
215215
<Import Project="..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets" Condition="Exists('..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets')" />
216216
</Project>

src/GitVersionCore.Tests/Mocks/MockRepository.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,11 @@ public RepositoryStatus RetrieveStatus(StatusOptions options)
164164
throw new NotImplementedException();
165165
}
166166

167+
public string Describe(Commit commit, DescribeOptions options)
168+
{
169+
throw new NotImplementedException();
170+
}
171+
167172
public Branch Head { get; set; }
168173
public Configuration Config { get; set; }
169174
public Index Index { get; set; }

src/GitVersionCore.Tests/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<package id="ApprovalUtilities" version="3.0.8" targetFramework="net45" />
55
<package id="FluentDateTime" version="1.12.0" targetFramework="net45" />
66
<package id="Fody" version="1.29.2" targetFramework="net45" developmentDependency="true" />
7-
<package id="LibGit2Sharp" version="0.20.1.0" targetFramework="net45" />
7+
<package id="LibGit2Sharp" version="0.21.0.176" targetFramework="net45" />
88
<package id="Mono.Cecil" version="0.9.6.1" targetFramework="net45" />
99
<package id="NUnit" version="2.6.4" targetFramework="net45" />
1010
<package id="NUnitTestAdapter" version="2.0.0" targetFramework="net45" />

src/GitVersionCore/GitVersionCore.csproj

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3-
<Import Project="..\packages\LibGit2Sharp.0.20.1.0\build\net40\LibGit2Sharp.props" Condition="Exists('..\packages\LibGit2Sharp.0.20.1.0\build\net40\LibGit2Sharp.props')" />
3+
<Import Project="..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props" Condition="Exists('..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props')" />
44
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
55
<PropertyGroup>
66
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -12,7 +12,7 @@
1212
<AssemblyName>GitVersionCore</AssemblyName>
1313
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
1414
<FileAlignment>512</FileAlignment>
15-
<NuGetPackageImportStamp>b4f87f91</NuGetPackageImportStamp>
15+
<NuGetPackageImportStamp>4d7309c4</NuGetPackageImportStamp>
1616
<BuildDir>$(SolutionDir)..\build\</BuildDir>
1717
</PropertyGroup>
1818
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
@@ -41,9 +41,9 @@
4141
<HintPath>..\packages\JetBrainsAnnotations.Fody.1.0.4.0\Lib\JetBrains.Annotations.dll</HintPath>
4242
<Private>False</Private>
4343
</Reference>
44-
<Reference Include="LibGit2Sharp, Version=0.20.1.0, Culture=neutral, processorArchitecture=MSIL">
45-
<SpecificVersion>False</SpecificVersion>
46-
<HintPath>..\packages\LibGit2Sharp.0.20.1.0\lib\net40\LibGit2Sharp.dll</HintPath>
44+
<Reference Include="LibGit2Sharp, Version=0.21.0.176, Culture=neutral, processorArchitecture=MSIL">
45+
<HintPath>..\packages\LibGit2Sharp.0.21.0.176\lib\net40\LibGit2Sharp.dll</HintPath>
46+
<Private>True</Private>
4747
</Reference>
4848
<Reference Include="System" />
4949
<Reference Include="System.Core" />
@@ -172,8 +172,8 @@
172172
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
173173
</PropertyGroup>
174174
<Error Condition="!Exists('..\packages\PepitaPackage.1.21.4\build\PepitaPackage.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\PepitaPackage.1.21.4\build\PepitaPackage.targets'))" />
175-
<Error Condition="!Exists('..\packages\LibGit2Sharp.0.20.1.0\build\net40\LibGit2Sharp.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.0.20.1.0\build\net40\LibGit2Sharp.props'))" />
176175
<Error Condition="!Exists('..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.1.29.2\build\portable-net+sl+win+wpa+wp\Fody.targets'))" />
176+
<Error Condition="!Exists('..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props'))" />
177177
</Target>
178178
<PropertyGroup>
179179
<PostBuildEvent>

src/GitVersionCore/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<package id="Caseless.Fody" version="1.3.7" targetFramework="net40" developmentDependency="true" />
44
<package id="Fody" version="1.29.2" targetFramework="net40" developmentDependency="true" />
55
<package id="JetBrainsAnnotations.Fody" version="1.0.4.0" targetFramework="net40" developmentDependency="true" />
6-
<package id="LibGit2Sharp" version="0.20.1.0" targetFramework="net40" />
6+
<package id="LibGit2Sharp" version="0.21.0.176" targetFramework="net40" />
77
<package id="PepitaPackage" version="1.21.4" targetFramework="net40" developmentDependency="true" />
88
<package id="Visualize.Fody" version="0.4.3.0" targetFramework="net40" developmentDependency="true" />
99
<package id="YamlDotNet" version="3.6.1" targetFramework="net40" />

src/GitVersionExe.Tests/GitVersionExe.Tests.csproj

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props" Condition="Exists('..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props')" />
34
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
45
<PropertyGroup>
56
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -11,6 +12,7 @@
1112
<AssemblyName>GitVersionExe.Tests</AssemblyName>
1213
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
1314
<FileAlignment>512</FileAlignment>
15+
<NuGetPackageImportStamp>56739c36</NuGetPackageImportStamp>
1416
</PropertyGroup>
1517
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1618
<DebugSymbols>true</DebugSymbols>
@@ -43,9 +45,9 @@
4345
<Reference Include="ApprovalUtilities.Net45">
4446
<HintPath>..\packages\ApprovalUtilities.3.0.8\lib\net45\ApprovalUtilities.Net45.dll</HintPath>
4547
</Reference>
46-
<Reference Include="LibGit2Sharp, Version=0.20.1.0, Culture=neutral, processorArchitecture=MSIL">
47-
<SpecificVersion>False</SpecificVersion>
48-
<HintPath>..\packages\LibGit2Sharp.0.20.1.0\lib\net40\LibGit2Sharp.dll</HintPath>
48+
<Reference Include="LibGit2Sharp, Version=0.21.0.176, Culture=neutral, processorArchitecture=MSIL">
49+
<HintPath>..\packages\LibGit2Sharp.0.21.0.176\lib\net40\LibGit2Sharp.dll</HintPath>
50+
<Private>True</Private>
4951
</Reference>
5052
<Reference Include="NSubstitute, Version=1.8.1.0, Culture=neutral, PublicKeyToken=92dd2e9066daa5ca, processorArchitecture=MSIL">
5153
<SpecificVersion>False</SpecificVersion>
@@ -124,4 +126,10 @@
124126
<PostBuildEvent>
125127
</PostBuildEvent>
126128
</PropertyGroup>
129+
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
130+
<PropertyGroup>
131+
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
132+
</PropertyGroup>
133+
<Error Condition="!Exists('..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\LibGit2Sharp.0.21.0.176\build\net40\LibGit2Sharp.props'))" />
134+
</Target>
127135
</Project>

src/GitVersionExe.Tests/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<packages>
33
<package id="ApprovalTests" version="3.0.8" targetFramework="net45" />
44
<package id="ApprovalUtilities" version="3.0.8" targetFramework="net45" />
5-
<package id="LibGit2Sharp" version="0.20.1.0" targetFramework="net45" />
5+
<package id="LibGit2Sharp" version="0.21.0.176" targetFramework="net45" />
66
<package id="NSubstitute" version="1.8.1.0" targetFramework="net45" />
77
<package id="NUnit" version="2.6.4" targetFramework="net45" />
88
<package id="NUnitTestAdapter" version="2.0.0" targetFramework="net45" />

src/GitVersionExe/FodyWeavers.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,5 @@
22
<Weavers VerifyAssembly="true" VerifyIgnoreCodes="0x80131869">
33
<Caseless/>
44
<JetBrainsAnnotations/>
5-
<Costura/>
65
<Visualize/>
76
</Weavers>

src/GitVersionExe/GemAssets/gitversion.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ EOF
1313
spec.homepage = 'http://github.com/Particular/GitVersion'
1414
spec.rubyforge_project = 'GitVersion'
1515

16-
spec.files = Dir['bin/**/*', 'lib/**/*', '*.gemspec']
17-
spec.executables = spec.files.grep(%r{^bin/.+(?<!\.exe|\.pdb)$}) { |f| File.basename(f) }
16+
spec.files = Dir['bin/**/*', 'lib/**/*', '*.gemspec'].reject { |f| File.directory?(f) }
17+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }.reject { |f| f =~ /\.(exe|pdb|dll)$/}
1818
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
1919
spec.require_paths = ['lib']
2020
end

0 commit comments

Comments
 (0)