@@ -66,14 +66,14 @@ let npmTool =
6666 match isUnix with
6767 | true -> " /usr/local/bin/npm"
6868 | _ -> __ SOURCE_ DIRECTORY__ </> " packages/Npm.js/tools/npm.cmd"
69-
69+
7070let vsceTool =
7171 #if MONO
7272 " vsce"
7373 #else
7474 " packages" </> " Node.js" </> " vsce.cmd" |> FullName
7575 #endif
76-
76+
7777
7878// --------------------------------------------------------------------------------------
7979// Build the Generator project and run it
@@ -96,12 +96,12 @@ Target "InstallVSCE" ( fun _ ->
9696Target " SetVersion" ( fun _ ->
9797 let fileName = " ./release/package.json"
9898 let lines =
99- File.ReadAllLines fileName
99+ File.ReadAllLines fileName
100100 |> Seq.map ( fun line ->
101101 if line.TrimStart() .StartsWith( " \" version\" :" ) then
102- let indent = line.Substring( 0 , line.IndexOf( " \" " ))
102+ let indent = line.Substring( 0 , line.IndexOf( " \" " ))
103103 sprintf " %s \" version\" : \" %O \" ," indent release.NugetVersion
104- else line)
104+ else line)
105105 File.WriteAllLines( fileName, lines)
106106)
107107
@@ -113,16 +113,11 @@ Target "BuildPackage" ( fun _ ->
113113)
114114
115115Target " PublishToGallery" ( fun _ ->
116- let publisher =
117- match getBuildParam " vsce-publisher" with
118- | s when not ( String.IsNullOrWhiteSpace s) -> s
119- | _ -> getUserPassword " VSCE Publisher: "
120-
121116 let token =
122117 match getBuildParam " vsce-token" with
123118 | s when not ( String.IsNullOrWhiteSpace s) -> s
124119 | _ -> getUserPassword " VSCE Token: "
125-
120+
126121 killProcess " vsce"
127122 run vsceTool ( sprintf " publish --pat %s " token) " release"
128123)
@@ -151,12 +146,12 @@ Target "ReleaseGitHub" (fun _ ->
151146
152147 Branches.tag " " release.NugetVersion
153148 Branches.pushTag " " remote release.NugetVersion
154-
149+
155150 let file = !! ( " ./temp" </> " *.vsix" ) |> Seq.head
156-
151+
157152 // release on github
158153 createClient user pw
159- |> createDraft gitOwner gitName release.NugetVersion ( release.SemVer.PreRelease <> None) release.Notes
154+ |> createDraft gitOwner gitName release.NugetVersion ( release.SemVer.PreRelease <> None) release.Notes
160155 |> uploadFile file
161156 |> releaseDraft
162157 |> Async.RunSynchronously
0 commit comments