Skip to content

Commit 6a7d652

Browse files
committed
Updated build to only restore paket prior
Added feed parameter to canary so we can publish master to elasticsearch-net-next on myget seperately
1 parent aa4eaab commit 6a7d652

File tree

4 files changed

+19
-18
lines changed

4 files changed

+19
-18
lines changed

build.bat

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ REM - elasticsearch_versions can be multiple separated with a semi-colon ';'
1212
if errorlevel 1 (
1313
exit /b %errorlevel%
1414
)
15-
.paket\paket.exe install
15+
.paket\paket.exe restore
1616
if errorlevel 1 (
1717
exit /b %errorlevel%
1818
)
@@ -23,7 +23,7 @@ SET ESVERSIONS=
2323
SET DNXVERSION="default"
2424
SET SKIPTESTS=0
2525
SET APIKEY=
26-
26+
SET FEED="elasticsearch-net"
2727

2828
IF /I "%1"=="skiptests" (
2929
set SKIPTESTS="1"
@@ -51,8 +51,7 @@ IF /I "%1%"=="integrate" (
5151

5252
IF /I "%1%"=="canary" (
5353
IF NOT [%2]==[] (set APIKEY="%2")
54-
IF /I "%3"=="skiptests" (set SKIPTESTS=1)
55-
IF /I "%2"=="skiptests" (set SKIPTESTS=1)
54+
IF NOT [%3]==[] (set FEED="%3")
5655
)
5756

58-
"packages\build\FAKE\tools\Fake.exe" "build\\scripts\\Targets.fsx" "target=%TARGET%" "version=%VERSION%" "esversions=%ESVERSIONS%" "skiptests=%SKIPTESTS%" "apiKey=%APIKEY%"
57+
"packages\build\FAKE\tools\Fake.exe" "build\\scripts\\Targets.fsx" "target=%TARGET%" "version=%VERSION%" "esversions=%ESVERSIONS%" "skiptests=%SKIPTESTS%" "apiKey=%APIKEY%" "feed=%FEED%"

build/scripts/Releasing.fsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,10 +102,11 @@ type Release() =
102102
MoveFile Paths.NugetOutput package
103103
)
104104

105-
static member PublishCanaryBuild accessKey =
105+
static member PublishCanaryBuild accessKey feed =
106106
!! "build/output/_packages/*-ci*.nupkg"
107107
|> Seq.iter(fun f ->
108-
let success = Tooling.execProcess (Tooling.NugetFile()) ["push"; f; accessKey; "-source"; "https://www.myget.org/F/elasticsearch-net/api/v2/package"]
108+
let source = "https://www.myget.org/F/" + feed + "/api/v2/package"
109+
let success = Tooling.execProcess (Tooling.NugetFile()) ["push"; f; accessKey; "-source"; source]
109110
match success with
110111
| 0 -> traceFAKE "publish to myget succeeded" |> ignore
111112
| _ -> failwith "publish to myget failed" |> ignore

build/scripts/Targets.fsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ Target "Clean" <| fun _ -> CleanDir Paths.BuildOutput
3737

3838
Target "BuildApp" <| fun _ -> Build.Compile()
3939

40-
Target "Test" <| fun _ -> Tests.RunUnitTests()
40+
Target "Test" <| fun _ -> Tests.RunUnitTests()
4141

42-
Target "QuickTest" <| fun _ -> Tests.RunUnitTests()
42+
Target "QuickTest" <| fun _ -> Tests.RunUnitTests()
4343

44-
Target "Integrate" <| fun _ -> Tests.RunIntegrationTests() (getBuildParamOrDefault "esversions" "")
44+
Target "Integrate" <| fun _ -> Tests.RunIntegrationTests() (getBuildParamOrDefault "esversions" "")
4545

46-
Target "WatchTests" <| fun _ ->
46+
Target "WatchTests" <| fun _ ->
4747
traceFAKE "Starting quick test (incremental compile then test)"
4848
use watcher = (!! "src/Tests/**/*.cs").And("src/Tests/**/*.md") |> WatchChanges (fun changes ->
4949
printfn "%A" changes
@@ -59,7 +59,7 @@ Target "Profile" <| fun _ -> Profiler.Run()
5959

6060
Target "Benchmark" <| fun _ -> Benchmarker.Run()
6161

62-
Target "QuickCompile" <| fun _ -> Build.QuickCompile()
62+
Target "QuickCompile" <| fun _ -> Build.QuickCompile()
6363

6464
Target "Version" <| fun _ ->
6565
Versioning.PatchAssemblyInfos()
@@ -74,7 +74,8 @@ Target "Release" <| fun _ ->
7474
Target "Canary" <| fun _ ->
7575
trace "Running canary build"
7676
let apiKey = (getBuildParam "apikey");
77-
if (not (String.IsNullOrWhiteSpace apiKey) || apiKey = "ignore") then Release.PublishCanaryBuild apiKey
77+
let feed = (getBuildParamOrDefault "feed" "elasticsearch-net");
78+
if (not (String.IsNullOrWhiteSpace apiKey) || apiKey = "ignore") then Release.PublishCanaryBuild apiKey feed
7879

7980
BuildFailureTarget "NotifyTestFailures" <| fun _ -> Tests.Notify() |> ignore
8081

paket.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
NUGET
2-
remote: http://api.nuget.org/v3/index.json
3-
specs:
4-
AsciiDocNet (1.0.0-alpha3)
5-
SemanticVersioning (0.6.17)
6-
ShellProgressBar (3.0)
72
remote: https://www.nuget.org/api/v2
83
specs:
4+
AsciiDocNet (1.0.0-alpha3)
95
Bogus (3.0.5-beta-2)
106
Newtonsoft.Json (>= 8.0.2) - framework: >= net40, dnx451, dnxcore50
117
System.ComponentModel (>= 4.0.1-beta-23516) - framework: dnxcore50
@@ -352,6 +348,10 @@ NUGET
352348
System.Threading.Tasks (>= 4.0) - framework: dnxcore50
353349
xunit.abstractions (>= 2.0) - framework: dnxcore50
354350
xunit.extensibility.core (2.1) - framework: >= net45, dnx451, dnxcore50, monoandroid, monotouch, xamarinios, winv4.5, wpv8.0, wpav8.1
351+
remote: http://api.nuget.org/v3/index.json
352+
specs:
353+
SemanticVersioning (0.6.17)
354+
ShellProgressBar (3.0)
355355

356356
GROUP build
357357
NUGET

0 commit comments

Comments
 (0)