Skip to content

Commit

Permalink
Login to VSCE and publish
Browse files Browse the repository at this point in the history
  • Loading branch information
forki committed Nov 20, 2015
1 parent a7c816c commit fb8ba04
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,4 @@ temp
.fake
.vs
*.js
release.cmd
26 changes: 24 additions & 2 deletions build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,32 @@ Target "BuildPackage" ( fun _ ->
|> Seq.iter(MoveFile "./temp/")
)

Target "LoginToVSCE" ( fun _ ->
let publisher =
match getBuildParam "vsce-publisher" with
| s when not (String.IsNullOrWhiteSpace s) -> s
| _ -> getUserPassword "VSCE Publisher: "

let token =
match getBuildParam "vsce-token" with
| s when not (String.IsNullOrWhiteSpace s) -> s
| _ -> getUserPassword "VSCE Token: "

killProcess "vsce"
run vsceTool (sprintf "login %s -pat %s" publisher token) "release"
)

Target "PublishToGallery" ( fun _ ->
killProcess "vsce"
run vsceTool "publish" "release"
)

// --------------------------------------------------------------------------------------
// Run generator by default. Invoke 'build <Target>' to override
// --------------------------------------------------------------------------------------

Target "Default" DoNothing
Target "Deploy" DoNothing
Target "Release" DoNothing

#if MONO
"Clean"
Expand All @@ -129,5 +149,7 @@ Target "Deploy" DoNothing
"Default"
==> "InstallVSCE"
==> "BuildPackage"
==> "Deploy"
// ==> "LoginToVSCE"
==> "PublishToGallery"
==> "Release"
RunTargetOrDefault "Default"

0 comments on commit fb8ba04

Please sign in to comment.