Skip to content

Commit 48224f1

Browse files
committed
updated build to build to artifacts/editorconfig-BUILDVERSION.vsix
1 parent af464dc commit 48224f1

File tree

4 files changed

+71
-104
lines changed

4 files changed

+71
-104
lines changed

build.fsx

Lines changed: 43 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ let tags = "editor, code editor, text editor, tabs, whitespace, indentation, new
3939

4040
// File system information
4141
// (<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"
4543

4644
// Git configuration (used for publishing documentation in gh-pages branch)
4745
// The profile where the project is posted
@@ -58,10 +56,8 @@ let release = parseReleaseNotes (IO.File.ReadAllLines "release-notes.md")
5856
let isAppVeyorBuild = environVar "APPVEYOR" <> null
5957
let buildVersion = sprintf "%s-a%s" release.NugetVersion (DateTime.UtcNow.ToString "yyMMddHHmm")
6058

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
6561

6662
Target "BuildVersion" (fun _ ->
6763
Shell.Exec("appveyor", sprintf "UpdateBuild -Version \"%s\"" buildVersion) |> ignore
@@ -76,7 +72,7 @@ Target "AssemblyInfo" (fun _ ->
7672
Attribute.FileVersion release.AssemblyVersion ]
7773

7874
CreateCSharpAssemblyInfo "src/EditorConfig.VisualStudio/Properties/AssemblyInfo.cs"
79-
(Attribute.InternalsVisibleTo "EditorConfig.VisualStudio.Tests" :: Attribute.Title "EditorConfig.VisualStudio" :: shared)
75+
(Attribute.Title "EditorConfig.VisualStudio" :: shared)
8076

8177
let manifest = "src/EditorConfig.VisualStudio/source.extension.vsixmanifest"
8278
File.WriteAllLines(
@@ -90,79 +86,59 @@ Target "AssemblyInfo" (fun _ ->
9086
// Clean build results
9187

9288
Target "Clean" (fun _ ->
93-
CleanDirs [buildDir; vsixDir; tempDir; "nuget"]
94-
)
95-
96-
Target "CleanDocs" (fun _ ->
97-
CleanDirs ["docs/output"]
89+
CleanDirs [buildDir;]
9890
)
9991

10092
// --------------------------------------------------------------------------------------
10193
// Build library & test project
10294

10395
Target "Build" (fun _ ->
10496
// 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"
10799
|> 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.)
136100

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)
143102
)
144103

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+
//)
151138

152139
// --------------------------------------------------------------------------------------
153140
// Release Scripts
154141

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-
)
166142

167143
(*#load "paket-files/build/fsharp/FAKE/modules/Octokit/Octokit.fsx"
168144
open Octokit
@@ -246,9 +222,7 @@ Target "Default" DoNothing
246222
==> "Build"
247223
//==> "CleanVSIX"
248224
==> "Default"
249-
(*==> "CleanDocs"
250-
==> "GenerateDocs"
251-
==> "ReleaseDocs"
225+
(*
252226
==> "ReleaseToGitHub"
253227
==> "UploadToGallery"*)
254228
==> "Release"

release-notes.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Release Notes
22

3+
## 0.6.0
4+
5+
* No longer relies on C++ editorconfig but on the .NET port
6+
* Moved to @jedmao branch that relies on codemaid based architecture so we can restore global settings more aggressively
7+
This to relieve a common nuisance that having two visual studios one with and one without .editorconfig settings do not respect global
8+
(default) settings.
9+
* Add file template to easily add `.editorconfig` file to a project
10+
* Re added @jaredpars autocomplete and syntax highlight work
11+
* Moved to paket and fake for builds and dependency management
12+
* Moved to VS SDK nuget packages
13+
* Fixed SO exception when renaming a file (only occured in development version not in previously published release)
14+
15+
## 0.5.0
16+
17+
* Autocomplete now accepts domain properties
18+
* VS 2015 support
319

420
## 0.4.0
521

Lines changed: 11 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,13 @@
1-
using System;
1+
// <auto-generated/>
22
using System.Reflection;
3-
using System.Resources;
4-
using System.Runtime.InteropServices;
53

6-
// General Information about an assembly is controlled through the following
7-
// set of attributes. Change these attribute values to modify the information
8-
// associated with an assembly.
9-
[assembly: AssemblyTitle("EditorConfig")]
10-
[assembly: AssemblyDescription("Loads editor options such as indentation sizes from standard, cross-platform .editorconfig files.")]
11-
[assembly: AssemblyConfiguration("")]
12-
[assembly: AssemblyCompany("EditorConfig Team")]
13-
[assembly: AssemblyProduct("EditorConfig")]
14-
[assembly: AssemblyCopyright("")]
15-
[assembly: AssemblyTrademark("")]
16-
[assembly: AssemblyCulture("")]
17-
[assembly: ComVisible(false)]
18-
[assembly: CLSCompliant(false)]
19-
[assembly: NeutralResourcesLanguage("en-US")]
20-
21-
// Version information for an assembly consists of the following four values:
22-
//
23-
// Major Version
24-
// Minor Version
25-
// Build Number
26-
// Revision
27-
//
28-
// You can specify all the values or you can default the Revision and Build Numbers
29-
// by using the '*' as shown below:
30-
31-
[assembly: AssemblyVersion("0.4.0.*")]
32-
[assembly: AssemblyFileVersion("0.4.0.*")]
33-
34-
35-
36-
[assembly: GuidAttribute("6b4a6b64-eda9-4078-a549-905ed7d6b8aa")]
4+
[assembly: AssemblyTitleAttribute("EditorConfig.VisualStudio")]
5+
[assembly: AssemblyProductAttribute("EditorConfig.VisualStudio")]
6+
[assembly: AssemblyDescriptionAttribute("Loads editor options such as indentation sizes from standard, cross-platform .editorconfig files on a per project/solution basis.")]
7+
[assembly: AssemblyVersionAttribute("0.6.0")]
8+
[assembly: AssemblyFileVersionAttribute("0.6.0")]
9+
namespace System {
10+
internal static class AssemblyVersionInformation {
11+
internal const string Version = "0.6.0";
12+
}
13+
}

src/EditorConfig.VisualStudio/source.extension.vsixmanifest

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
44
<Identity Id="EditorConfig..5cd8e6a2-be43-4fcc-a345-40f6cc1e9c9f" Version="0.6.0" Language="en-US" Publisher="EditorConfig Team" />

0 commit comments

Comments
 (0)