Skip to content

Commit

Permalink
Merge branch 'develop/VsWhat' into release/VsWhat
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveGilham committed Dec 4, 2022
2 parents d86ac53 + 54868af commit 995e10e
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 34 deletions.
4 changes: 3 additions & 1 deletion .fantomasignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Ignore interfaces (documentation annotations)
*.fsi
Abstract.fs
Abstract.fs
*.AssemblyAttributes.fs
*/_Generated/*.fs
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
- master

env:
VERSIONTEMPLATE: 5.23.0.{build}-pre
VERSIONTEMPLATE: 5.23.0.{build}
DOTNET_ROLL_FORWARD : LatestMajor

jobs:
Expand Down
1 change: 0 additions & 1 deletion AltCode.Fake.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "BuildItems", "BuildItems",
ProjectSection(SolutionItems) = preProject
Build\actions.fsx = Build\actions.fsx
Build\AltCode.Fake.nuspec = Build\AltCode.Fake.nuspec
appveyor.yml = appveyor.yml
Build\build.fsx = Build\build.fsx
Directory.Build.props = Directory.Build.props
Directory.Build.targets = Directory.Build.targets
Expand Down
1 change: 1 addition & 0 deletions Build/AltCode.Fake.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>@description@</description>
<releaseNotes>@releaseNotes@</releaseNotes>
<readme>Nonesuch.md</readme>
<copyright>@copyright@</copyright>
<tags>FAKE build</tags>
@dependencies@
Expand Down
11 changes: 11 additions & 0 deletions Build/README.Fake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

# AltCode.Fake.DotNet.Gendarme

A Gendarme helper along the lines of the FxCop task `Fake.DotNet.FxCop`
For FAKE >= 5.23.0 or later.

Can be used with the most recent [homebrew release from my fork](https://www.nuget.org/packages/altcode.gendarme/) to analyze netcore/netstandard builds.

## Usage

See the [Wiki page](https://github.com/SteveGilham/altcode.fake/wiki/The-AltCode.Fake.DotNet.Gendarme-package) for details
7 changes: 7 additions & 0 deletions Build/README.What.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# AltCode.VsWhat

A tool to list Visual Studio instances and their installed packages; a thin wrapper over [BlackFox.VsWhere](https://github.com/vbfox/FoxSharp/blob/master/src/BlackFox.VsWhere/Readme.md) to make this one specific query.

## Usage

See the [Wiki page](https://github.com/SteveGilham/altcode.fake/wiki/The-AltCode.VsWhat-package) for details
11 changes: 8 additions & 3 deletions Build/actions.fs
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,8 @@ do ()"""
let RunDotnet (o: DotNet.Options -> DotNet.Options) cmd args msg =
DotNet.exec o cmd args |> (HandleResults msg)

let PrepareReadMe packingCopyright =
let readme = Path.getFullName "README.md"
let PrepareReadMe packingCopyright file =
let readme = Path.getFullName file
let document = File.ReadAllText readme
let markdown = Markdown()

Expand Down Expand Up @@ -312,6 +312,11 @@ a:hover {color: #ecc;}
| _ -> ())

let packable =
Path.getFullName "./_Binaries/README.html"
Path.getFullName (
file
.Replace("Build", "_Binaries")
.Replace("md", "html")
)
printfn "packable %A" packable

xmlform.Save packable
59 changes: 43 additions & 16 deletions Build/targets.fs
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,20 @@ module Targets =
printfn "Build at %A" infoV

let _Target s f =
let doTarget s f =
let banner x =
printfn ""
printfn " ****************** %s ******************" s
f x

Target.create s banner

Target.description s
Target.create s f
doTarget s f

let s2 = "Replay" + s
Target.description s2
doTarget s2 f

// Preparation

Expand All @@ -257,11 +269,18 @@ module Targets =

let now = DateTimeOffset.UtcNow

let version =
if currentBranch.Contains "VsWhat" then
sprintf "%d.%d.%d.{build}" (now.Year - 2000) now.Month now.Day
let trailer =
if currentBranch.StartsWith "release/" then
String.Empty
else
Actions.GetVersionFromYaml()
"-pre"

let version =
(if currentBranch.Contains "VsWhat" then
sprintf "%d.%d.%d.{build}" (now.Year - 2000) now.Month now.Day
else
Actions.GetVersionFromYaml())
+ trailer

printfn "Raw version %s" version

Expand Down Expand Up @@ -696,13 +715,11 @@ module Targets =
let gendarmeDir =
Path.getFullName "_Binaries/AltCode.Fake.DotNet.Gendarme/Release+AnyCPU"

let packable =
Path.getFullName "./_Binaries/README.html"

let gendarmeFiles =
[ (Path.getFullName "./LICENS*", Some "", None)
(Path.getFullName "./Build/AltCode.Fake_128.*g", Some "", None)
(packable, Some "", None) ]
(Path.getFullName "./Build/README.Fake.md", Some "", None)
(Path.getFullName "./_Binaries/README.Fake.html", Some "", None) ]

let gendarmeNetcoreFiles =
(!!(gendarmeDir
Expand Down Expand Up @@ -730,7 +747,8 @@ module Targets =
let whatPack =
[ (Path.getFullName "./LICENS*", Some "", None)
(Path.getFullName "./Build/AltCode.VsWhat_128.*g", Some "", None)
(packable, Some "", None) ]
(Path.getFullName "./Build/README.What.md", Some "", None)
(Path.getFullName "./_Binaries/README.What.html", Some "", None) ]

[ (List.concat [ gendarmeFiles; gendarmeNetcoreFiles ],
packageGendarme,
Expand Down Expand Up @@ -801,19 +819,24 @@ module Targets =
"./_Generated/altcode.fake.dotnet.gendarme.nuspec",
"AltCode.Fake.DotNet.Gendarme (FAKE task helper)",
None,
Some "FAKE build Gendarme")
Some "FAKE build Gendarme",
"README.Fake.md")
("DotnetTool",
"./_Generated/altcode.vswhat.nuspec",
"AltCode.VsWhat (Visual Studio package listing tool)",
Some "Build/AltCode.VsWhat_128.png",
Some "Visual Studio") ]
|> List.iter (fun (ptype, path, caption, icon, tags) ->
Some "Visual Studio",
"README.What.md") ]
|> List.iter (fun (ptype, path, caption, icon, tags, readme) ->
let x s =
XName.Get(s, "http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd")

let dotnetNupkg =
XDocument.Load "./Build/AltCode.Fake.nuspec"

dotnetNupkg.Descendants(x "readme")
|> Seq.iter (fun hint -> hint.SetValue readme)

let title =
dotnetNupkg.Descendants(x "title") |> Seq.head

Expand Down Expand Up @@ -857,12 +880,16 @@ module Targets =

let PrepareReadMe =
(fun _ ->
Actions.PrepareReadMe(
(Copyright.Value)
let c =
Copyright
.Value
.Replace("©", "&#xa9;")
.Replace("<", "&lt;")
.Replace(">", "&gt;")
))

[ "./Build/README.Fake.md"
"./Build/README.What.md" ]
|> Seq.iter (Actions.PrepareReadMe c))

// Post-packaging deployment touch test

Expand Down
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FAKE helper code that I've written as a side-effect of other projects

## What's in the box?

For FAKE >= 5.19.1 or later for .net framework and .net core
For FAKE >= 5.23.0 or later for .net core

* [`AltCode.Fake.DotNet.Gendarme` ![Nuget](https://buildstats.info/nuget/AltCode.Fake.DotNet.Gendarme)](http://nuget.org/packages/altcode.fake.dotnet.gendarme), a gendarme helper along the lines of the FxCop task `Fake.DotNet.FxCop`

Expand All @@ -17,9 +17,9 @@ DotNet global tools
## Continuous Integration


| | | |
| --- | --- | --- |
| **Build** | <sup>GitHub</sup> [![Build status](https://github.com/SteveGilham/altcode.fake/workflows/CI/badge.svg)](https://github.com/SteveGilham/altcover/altcode.fake?query=workflow%3ACI)[![Build history](https://buildstats.info/github/chart/SteveGilham/altcode.fake?branch=master)](https://github.com/SteveGilham/altcode.fake/actions?query=workflow%3ACI)| <sup>AppVeyor</sup> [![Build status](https://img.shields.io/appveyor/ci/SteveGilham/altcode-fake/master.svg)](https://ci.appveyor.com/project/SteveGilham/altcode-fake) ![Build history](https://buildstats.info/appveyor/chart/SteveGilham/altcode-fake?branch=master) |
| | |
| --- | --- |
| **Build** | <sup>GitHub</sup> [![Build status](https://github.com/SteveGilham/altcode.fake/workflows/CI/badge.svg)](https://github.com/SteveGilham/altcover/altcode.fake?query=workflow%3ACI)[![Build history](https://buildstats.info/github/chart/SteveGilham/altcode.fake?branch=master)](https://github.com/SteveGilham/altcode.fake/actions?query=workflow%3ACI)|
| **Unit Test coverage** | <sup>Coveralls</sup> [![Coverage Status](https://coveralls.io/repos/github/SteveGilham/altcode.fake/badge.svg?branch=master)](https://coveralls.io/github/SteveGilham/altcode.fake?branch=master) |

## Usage
Expand All @@ -35,7 +35,7 @@ See the [Wiki page](https://github.com/SteveGilham/altcode.fake/wiki) for detail

It is assumed that the following are available

.net core SDK 5.0.100 or later (`dotnet`) -- try https://www.microsoft.com/net/download
.net core SDK 7.0.100 or later (`dotnet`) -- try https://www.microsoft.com/net/download

#### Windows

Expand All @@ -47,17 +47,16 @@ It is assumed that the latest `mono`, and `dotnet` are on the `PATH` already, an

### Bootstrapping

Start by setting up `dotnet fake` with `dotnet tool restore`
Then `dotnet fake run ./Build/setup.fsx` to do the rest of the set-up.
Start by setting up `required tools with `dotnet tool restore`
Then `dotnet run --project ./Build/Setup.fsproj` to do the rest of the set-up.

### Normal builds

Running `dotnet fake run ./Build/build.fsx` performs a full build/test/package process.
Running `dotnet run --project ./Build/Build.fsproj` performs a full build/test/package process.

Use `dotnet fake run ./Build/build.fsx --target <targetname>` to run to a specific target.
Use `dotnet run --project ./Build/Build.fsproj --target <targetname>` to run to a specific target.


## Thanks to

* [AppVeyor](https://ci.appveyor.com/project/SteveGilham/altcode-fake) for allowing free build CI services for Open Source projects
* [Coveralls](https://coveralls.io/r/SteveGilham/altcode.fake) for allowing free services for Open Source projects
4 changes: 2 additions & 2 deletions ReleaseNotes.VsWhat.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# 22.12.4.40
* No functional change; testing new release bundling
# 22.12.4.41
* No functional change since 22.12.1.38; testing new release bundling

# 22.12.1.38
* Support for .net7.0
Expand Down

0 comments on commit 995e10e

Please sign in to comment.