@@ -39,9 +39,7 @@ let tags = "editor, code editor, text editor, tabs, whitespace, indentation, new
39
39
40
40
// File system information
41
41
// (<solutionFile>.sln is built during the building process)
42
- let solutionFile = " EditorConfig.VisualStudio"
43
- // Pattern specifying assemblies to be tested using NUnit
44
- let testAssemblies = " tests/**/bin/Release/*Tests*.dll"
42
+ let solutionFile = " src/EditorConfig.VisualStudio.sln"
45
43
46
44
// Git configuration (used for publishing documentation in gh-pages branch)
47
45
// The profile where the project is posted
@@ -58,10 +56,8 @@ let release = parseReleaseNotes (IO.File.ReadAllLines "release-notes.md")
58
56
let isAppVeyorBuild = environVar " APPVEYOR" <> null
59
57
let buildVersion = sprintf " %s -a%s " release.NugetVersion ( DateTime.UtcNow.ToString " yyMMddHHmm" )
60
58
61
- let buildDir = " bin"
62
- let vsixDir = " bin/vsix"
63
- let tempDir = " temp"
64
- let buildMergedDir = buildDir @@ " merged"
59
+ let buildDir = " artifacts"
60
+ let vsixArtifact = sprintf " %s /EditorConfig-%s .vsix" buildDir buildVersion
65
61
66
62
Target " BuildVersion" ( fun _ ->
67
63
Shell.Exec( " appveyor" , sprintf " UpdateBuild -Version \" %s \" " buildVersion) |> ignore
@@ -76,7 +72,7 @@ Target "AssemblyInfo" (fun _ ->
76
72
Attribute.FileVersion release.AssemblyVersion ]
77
73
78
74
CreateCSharpAssemblyInfo " src/EditorConfig.VisualStudio/Properties/AssemblyInfo.cs"
79
- ( Attribute.InternalsVisibleTo " EditorConfig.VisualStudio.Tests " :: Attribute. Title " EditorConfig.VisualStudio" :: shared)
75
+ ( Attribute.Title " EditorConfig.VisualStudio" :: shared)
80
76
81
77
let manifest = " src/EditorConfig.VisualStudio/source.extension.vsixmanifest"
82
78
File.WriteAllLines(
@@ -90,79 +86,59 @@ Target "AssemblyInfo" (fun _ ->
90
86
// Clean build results
91
87
92
88
Target " Clean" ( fun _ ->
93
- CleanDirs [ buildDir; vsixDir; tempDir; " nuget" ]
94
- )
95
-
96
- Target " CleanDocs" ( fun _ ->
97
- CleanDirs [ " docs/output" ]
89
+ CleanDirs [ buildDir;]
98
90
)
99
91
100
92
// --------------------------------------------------------------------------------------
101
93
// Build library & test project
102
94
103
95
Target " Build" ( fun _ ->
104
96
// We would like to build only one solution
105
- !! ( solutionFile + " .sln " )
106
- |> MSBuildReleaseExt " " [ " VisualStudioVersion" , " 12 .0" ] " Rebuild"
97
+ !! solutionFile
98
+ |> MSBuildReleaseExt " " [ " VisualStudioVersion" , " 14 .0" ] " Rebuild"
107
99
|> ignore
108
- )
109
-
110
- Target " CleanVSIX" ( fun _ ->
111
- ZipHelper.Unzip vsixDir " bin/EditorConfig.VisualStudio.vsix"
112
- let regex = Regex( " bin" )
113
- let filesToKeep =
114
- Directory.GetFiles( " bin" , " *.dll" )
115
- |> Seq.map ( fun fileName -> regex.Replace( fileName, vsixDir, 1 ))
116
- let filesToDelete =
117
- Seq.fold (--) (!! " bin/vsix/*.dll" ) filesToKeep
118
- ++ " bin/vsix/Microsoft.VisualStudio*"
119
- ++ " bin/vsix/Microsoft.Build*"
120
- DeleteFiles filesToDelete
121
-
122
- CreateDir buildMergedDir
123
-
124
- let filesToPack =
125
- [ " EditorConfig.VisualStudio.dll" ; " EditorConfig.Core.dll" ; " FSharp.Core.dll" ; " Newtonsoft.Json.dll" ; " Chessie.dll" ;
126
- " ReactiveUI.dll" ; " ReactiveUI.Events.dll" ; " Splat.dll" ; " System.Reactive.Core.dll" ; " System.Reactive.Interfaces.dll" ; " System.Reactive.Linq.dll" ; " System.Reactive.PlatformServices.dll" ; " System.Reactive.Windows.Threading.dll" ]
127
- |> List.map ( fun l -> vsixDir @@ l)
128
-
129
- let toPack = filesToPack |> separated " "
130
-
131
- let result =
132
- ExecProcess ( fun info ->
133
- info.FileName <- currentDirectory </> " packages" </> " build" </> " ILRepack" </> " tools" </> " ILRepack.exe"
134
- info.Arguments <- sprintf " /verbose /lib:%s /ver:%s /out:%s %s " vsixDir release.AssemblyVersion ( buildMergedDir </> " Paket.VisualStudio.dll" ) toPack
135
- ) ( TimeSpan.FromMinutes 5. )
136
100
137
- if result <> 0 then failwithf " Error during ILRepack execution."
138
-
139
- DeleteFiles filesToPack
140
- CopyFile vsixDir ( buildMergedDir </> " Paket.VisualStudio.dll" )
141
-
142
- ZipHelper.Zip vsixDir " bin/Paket.VisualStudio.vsix" (!! " bin/vsix/**" )
101
+ File.Copy ( " src/EditorConfig.VisualStudio/bin/Release/EditorConfig.vsix" , vsixArtifact)
143
102
)
144
103
145
- // --------------------------------------------------------------------------------------
146
- // Generate the documentation
147
-
148
- Target " GenerateDocs" ( fun _ ->
149
- executeFSIWithArgs " docs/tools" " generate.fsx" [ " --define:RELEASE" ] [] |> ignore
150
- )
104
+ //Target "CleanVSIX" (fun _ ->
105
+ // ZipHelper.Unzip vsixDir "bin/EditorConfig.VisualStudio.vsix"
106
+ // let regex = Regex("bin")
107
+ // let filesToKeep =
108
+ // Directory.GetFiles("bin", "*.dll")
109
+ // |> Seq.map (fun fileName -> regex.Replace(fileName, vsixDir, 1))
110
+ // let filesToDelete =
111
+ // Seq.fold (--) (!! "bin/vsix/*.dll") filesToKeep
112
+ // ++ "bin/vsix/Microsoft.VisualStudio*"
113
+ // ++ "bin/vsix/Microsoft.Build*"
114
+ // DeleteFiles filesToDelete
115
+ //
116
+ // CreateDir buildMergedDir
117
+ //
118
+ // let filesToPack =
119
+ // ["EditorConfig.VisualStudio.dll"; "EditorConfig.Core.dll"; "FSharp.Core.dll"; "Newtonsoft.Json.dll" ; "Chessie.dll";
120
+ // "ReactiveUI.dll"; "ReactiveUI.Events.dll"; "Splat.dll"; "System.Reactive.Core.dll"; "System.Reactive.Interfaces.dll"; "System.Reactive.Linq.dll"; "System.Reactive.PlatformServices.dll"; "System.Reactive.Windows.Threading.dll"]
121
+ // |> List.map (fun l -> vsixDir @@ l)
122
+ //
123
+ // let toPack = filesToPack |> separated " "
124
+ //
125
+ // let result =
126
+ // ExecProcess (fun info ->
127
+ // info.FileName <- currentDirectory </> "packages" </> "build" </> "ILRepack" </> "tools" </> "ILRepack.exe"
128
+ // info.Arguments <- sprintf "/verbose /lib:%s /ver:%s /out:%s %s" vsixDir release.AssemblyVersion (buildMergedDir </> "Paket.VisualStudio.dll") toPack
129
+ // ) (TimeSpan.FromMinutes 5.)
130
+ //
131
+ // if result <> 0 then failwithf "Error during ILRepack execution."
132
+ //
133
+ // DeleteFiles filesToPack
134
+ // CopyFile vsixDir (buildMergedDir </> "Paket.VisualStudio.dll")
135
+ //
136
+ // ZipHelper.Zip vsixDir "bin/Paket.VisualStudio.vsix" (!! "bin/vsix/**")
137
+ //)
151
138
152
139
// --------------------------------------------------------------------------------------
153
140
// Release Scripts
154
141
155
- Target " ReleaseDocs" ( fun _ ->
156
- let tempDocsDir = " temp/gh-pages"
157
- CleanDir tempDocsDir
158
- Repository.cloneSingleBranch " " cloneUrl " gh-pages" tempDocsDir
159
-
160
- fullclean tempDocsDir
161
- CopyRecursive " docs/output" tempDocsDir true |> tracefn " %A "
162
- StageAll tempDocsDir
163
- Git.Commit.Commit tempDocsDir ( sprintf " [skip ci] Update generated documentation for version %s " release.NugetVersion)
164
- Branches.push tempDocsDir
165
- )
166
142
167
143
(* #load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx"
168
144
open Octokit
@@ -246,9 +222,7 @@ Target "Default" DoNothing
246
222
==> " Build"
247
223
//==> "CleanVSIX"
248
224
==> " Default"
249
- (* ==> "CleanDocs"
250
- ==> "GenerateDocs"
251
- ==> "ReleaseDocs"
225
+ (*
252
226
==> "ReleaseToGitHub"
253
227
==> "UploadToGallery"*)
254
228
==> " Release"
0 commit comments