Skip to content

Commit f60bc1f

Browse files
committed
FAKE improvements
- paket restore not paket install before calling FAKE - allow myget feed to specified when calling canary build
1 parent 5cf52bf commit f60bc1f

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)