Permalink
Browse files

Enable travis.

  • Loading branch information...
2 parents bf0bd09 + 418703f commit 7675359d79b51c043d29e63d18f80fe24bc39841 @spraints spraints committed Sep 3, 2012
View
@@ -1,14 +1,17 @@
-
-.*.swp
+# Local-only VS/Re#/etc files
*.suo
-bin
+*.user
+*.gpState
_ReSharper.*
+.*.swp
+
+#
+
+# Build outputs
+bin
obj
-*.gpState
-*.user
-TestResults
-GitTfs/GitVersionInfo
pkg
-GitTfs.sln.*
-*.dotCover
+
+# 3rd-party stuff copied during build
packages/
+GitTfs/git2.*
View
@@ -0,0 +1,52 @@
+#!/bin/bash
+
+command=$1
+manifest=$2
+dest=$7
+
+ERR_COMMAND=1
+ERR_DOWNLOAD=2
+ERR_EXTRACT=3
+
+if [ "$command" != "install" ]
+then
+ echo "Only install is supported. (command was $command)"
+ exit $ERR_COMMAND
+fi
+
+# http://stackoverflow.com/questions/893585/how-to-parse-xml-in-bash
+read_dom() {
+ local IFS=\>
+ read -d \< ENTITY CONTENT
+}
+
+parse_dom() {
+ echo $ENTITY
+ TAG_NAME=${ENTITY%% *}
+ ATTRIBUTES=${ENTITY#* }
+ if [ "$TAG_NAME" == "package" ]
+ then
+ eval local $ATTRIBUTES
+ pkgdest="$dest/$id.$version"
+ pkg="$id.$version.nupkg"
+ downloaded="$pkgdest/$pkg"
+ if [ ! -d "$pkgdest" ]
+ then
+ mkdir -p "$pkgdest"
+ fi
+ if [ ! -f "$downloaded" ]
+ then
+ curl -L -o "$downloaded" "https://nuget.org/api/v2/package/$id/$version" || exit $ERR_DOWNLOAD
+ fi
+ unzip -o -d $pkgdest $downloaded || exit $ERR_EXTRACT
+ fi
+}
+
+install_packages() {
+ while read_dom
+ do
+ parse_dom
+ done
+}
+
+cat $manifest | install_packages
@@ -40,11 +40,11 @@
<PropertyGroup>
<!-- NuGet command -->
- <NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\nuget.exe</NuGetExePath>
+ <NuGetExePath Condition=" '$(NuGetExePath)' == '' ">$(NuGetToolsPath)\NuGet.exe</NuGetExePath>
<PackageSources Condition=" $(PackageSources) == '' ">@(PackageSource)</PackageSources>
<NuGetCommand Condition=" '$(OS)' == 'Windows_NT'">"$(NuGetExePath)"</NuGetCommand>
- <NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">mono --runtime=v4.0.30319 $(NuGetExePath)</NuGetCommand>
+ <NuGetCommand Condition=" '$(OS)' != 'Windows_NT' ">$(NuGetToolsPath)/fake-nuget</NuGetCommand>
<PackageOutputDir Condition="$(PackageOutputDir) == ''">$(TargetDir.Trim('\\'))</PackageOutputDir>
@@ -140,4 +140,4 @@
</Code>
</Task>
</UsingTask>
-</Project>
+</Project>
View
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<packages>
+ <package id="xunit.runners" version="1.9.1" />
+</packages>
View
@@ -0,0 +1,12 @@
+language: c
+
+install:
+ - sudo apt-get install mono-devel mono-gmcs
+
+script:
+ - git submodule update --init
+ - xbuild GitTfs.sln /p:Configuration=Debug /t:GitTfsTest
+
+after_script:
+ - ./.nuget/fake-nuget install .nuget/packages.config -source "" -RequireConsent -o ./packages
+ - mono packages/xunit.runners.1.9.1/tools/xunit.console.clr4.exe GitTfsTest/bin/Debug/GitTfsTest.dll
@@ -126,7 +126,8 @@
</Target>
-->
<PropertyGroup>
- <PostBuildEvent>xcopy /y "$(TargetDir)*.dll" "$(SolutionDir)GitTfs\$(OutDir)"</PostBuildEvent>
+ <PostBuildEvent Condition="'$(OS)' == 'Windows_NT'">xcopy /y "$(TargetDir)*.dll" "$(SolutionDir)GitTfs\$(OutDir)"</PostBuildEvent>
+ <PostBuildEvent Condition="'$(OS)' != 'Windows_NT'">cp "$(TargetDir)"*.dll "$(SolutionDir)GitTfs\$(OutDir)"</PostBuildEvent>
</PropertyGroup>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
-</Project>
+</Project>
View
@@ -18,7 +18,7 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{F52EAF74-50FA-495E-8A4A-29F91F4C00C9}"
ProjectSection(SolutionItems) = preProject
.nuget\NuGet.exe = .nuget\NuGet.exe
- .nuget\NuGet.targets = .nuget\NuGet.targets
+ .nuget\nuget.targets = .nuget\nuget.targets
EndProjectSection
EndProject
Global
View
@@ -244,11 +244,12 @@
</Target>
-->
<PropertyGroup>
- <PreBuildEvent>xcopy /Y "$(SolutionDir)\lib\libgit2sharp\Lib\NativeBinaries\$(PlatformName)\*.*" "$(ProjectDir)"</PreBuildEvent>
+ <PreBuildEvent Condition="'$(OS)' == 'Windows_NT'">xcopy /Y "$(SolutionDir)\lib\libgit2sharp\Lib\NativeBinaries\$(PlatformName)\*.*" "$(ProjectDir)"</PreBuildEvent>
+ <PreBuildEvent Condition="'$(OS)' != 'Windows_NT'">cp "$(SolutionDir)/lib/libgit2sharp/Lib/NativeBinaries/$(PlatformName)/"* "$(ProjectDir)"</PreBuildEvent>
</PropertyGroup>
<PropertyGroup>
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
<Import Project="$(SolutionDir)\.nuget\nuget.targets" />
-</Project>
+</Project>
Oops, something went wrong.

0 comments on commit 7675359

Please sign in to comment.