-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOcto.fs
23 lines (19 loc) · 920 Bytes
/
Octo.fs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
namespace Albelli
open Fake.Core
open Fake.DotNet
module OctoTool =
let pack (id : string) (version : string) (basePath : string) (outFolder : string) =
let args =
Arguments.Empty
|> Arguments.append ["pack"]
|> Arguments.appendNotEmpty "--id" id
|> Arguments.appendNotEmpty "--version" version
|> Arguments.appendNotEmpty "--basepath" basePath
|> Arguments.appendNotEmpty "--outFolder" outFolder
|> Arguments.toArray
let proc =
CreateProcess.fromRawCommand "octo" args
|> CreateProcess.withToolType (ToolType.CreateLocalTool())
|> CreateProcess.redirectOutput
|> Proc.run
if proc.ExitCode <> 0 then failwithf "Octo failed with exit code %i and message %s" proc.ExitCode proc.Result.Output