Skip to content

Commit 8980d9a

Browse files
committed
Merge pull request #1149 from elasticsearch/feature/travis-ci
Feature/travis ci
2 parents 9c2d482 + 43d7314 commit 8980d9a

File tree

7 files changed

+340
-334
lines changed

7 files changed

+340
-334
lines changed

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
language: csharp
2+
solution: src/Elasticsearch.sln
3+
script: ./build.sh

build.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NUGET="build/tools/nuget/nuget.exe"
2-
FAKE="build/tools/FAKE/tools/Fake.exe"
2+
FAKE="build/tools/FAKE/tools/FAKE.exe"
33
NUNIT="build/tools/NUnit.Runners/tools/nunit-console.exe"
44
FSHARPCLI="build/tools/Fsharp.Formatting.CommandTool/Fsharp.Formatting.CommandTool.nupkg"
55
SOURCELINK="build/tools/SourceLink.Fake/SourceLink.Fake.nupkg"
@@ -8,7 +8,7 @@ SOURCELINK="build/tools/SourceLink.Fake/SourceLink.Fake.nupkg"
88
if [[ ! -f "$NUGET" ]]; then
99
echo NUGET not found.. Download...
1010
mkdir -p build/tools/nuget
11-
curl -o $NUGET http://build.nuget.org/drops/client/master/NuGet.exe
11+
curl -o $NUGET https://nugetbuild.cloudapp.net/drops/client/master/NuGet.exe
1212
fi
1313

1414
#we need FAKE to process our build scripts
@@ -40,6 +40,9 @@ libdir=$PWD/build/tools/FAKE/tools/
4040
$FSHARPI --lib:$libdir $@
4141
EOF
4242
chmod +x fsharpi
43-
mono --runtime=v4.0 "$FAKE" build/build.fsx $@
43+
mono --runtime=v4.0 "$FAKE" build/build.fsx "skiptests=1" $@
44+
MONOEXIT=$?
4445
rm fsharpi
45-
#"build\tools\FAKE\tools\Fake.exe" "build\build.fsx" "target=%TARGET%" "version=%VERSION%"
46+
#FORCE exit code to be that of calling fake not the last rm action
47+
exit $MONOEXIT
48+
#"build\tools\FAKE\tools\Fake.exe" "build\build.fsx" "target=%TARGET%" "version=%VERSION%" "skiptests=1"

build/build.fsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// include Fake lib
2-
#r @"tools/FAKE/tools/FakeLib.dll"
2+
#r @"FakeLib.dll"
33
#load @"InheritDoc.fsx"
44
open Fake
55
open System
@@ -31,7 +31,7 @@ Target "BuildApp" (fun _ ->
3131
//Override the prebuild event because it just calls a fake task BuildApp depends on anyways
3232
let msbuildProperties = [
3333
("Configuration","Release");
34-
("PreBuildEvent","ECHO");
34+
("PreBuildEvent","echo");
3535
]
3636

3737
//Compile each csproj and output it seperately in build/output/PROJECTNAME
@@ -73,7 +73,7 @@ Target "CreateKeysIfAbsent" (fun _ ->
7373
)
7474

7575
let getFileVersion = fun _ ->
76-
let assemblyFileContents = ReadFileAsString @"src\NEST\Properties\AssemblyInfo.cs"
76+
let assemblyFileContents = ReadFileAsString @"src/Nest/Properties/AssemblyInfo.cs"
7777
let re = @"\[assembly\: AssemblyFileVersionAttribute\(""([^""]+)""\)\]"
7878
let matches = Regex.Matches(assemblyFileContents,re)
7979
let defaultVersion = regex_replace re "$1" (matches.Item(0).Captures.Item(0).Value)
@@ -231,7 +231,7 @@ Target "Nightly" (fun _ ->
231231
==> "CreateKeysIfAbsent"
232232
=?> ("Version", hasBuildParam "version")
233233
==> "BuildApp"
234-
==> "Test"
234+
=?> ("Test", (not (hasBuildParam "skiptests")))
235235
==> "Build"
236236

237237
"CreateKeysIfAbsent"
@@ -248,4 +248,4 @@ Target "Nightly" (fun _ ->
248248
"CreateKeysIfAbsent"
249249
"Version"
250250
// start build
251-
RunTargetOrDefault "Build"
251+
RunTargetOrDefault "Build"

dep/repositories.config

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<repository path="../src/Nest/packages.config" />
88
<repository path="../src/Profiling/Profiling.Indexing/packages.config" />
99
<repository path="../src/Profiling/Profiling.InMemoryConnection/packages.config" />
10+
<repository path="../src/Serialization/Elasticsearch.Net.JsonNET/packages.config" />
1011
<repository path="../src/Tests/Elasticsearch.Net.Integration.Yaml/packages.config" />
1112
<repository path="../src/Tests/Elasticsearch.Net.Tests.Unit/packages.config" />
1213
<repository path="../src/Tests/Nest.Tests.Integration/packages.config" />

0 commit comments

Comments
 (0)