Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Squirrel's --no-msi option #1013

Merged
merged 2 commits into from
Nov 30, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/app/FakeLib/SquirrelHelper.fs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ type SquirrelParams =
/// The full path to an optional icon, which will be used for the generated installer.
SetupIcon : string option

/// Do not create an MSI file
NoMsi : bool

/// The path to Squirrel: `squirrel.exe`
ToolPath : string

Expand All @@ -50,6 +53,7 @@ type SquirrelParams =
/// - `BootstrapperExe` - `None`
/// - `LoadingGif` - `None`
/// - `SetupIcon` - `None`
/// - `NoMsi` - `false`
/// - `ToolPath` - The `squirrel.exe` path if it exists in a subdirectory of the current directory.
/// - `TimeOut` - 10 minutes
/// - `SignExecutable` - `None`
Expand All @@ -63,6 +67,7 @@ let SquirrelDefaults =
BootstrapperExe = None
LoadingGif = None
SetupIcon = None
NoMsi = false
ToolPath = findToolInSubPath toolname (currentDirectory @@ "tools" @@ "Squirrel")
TimeOut = TimeSpan.FromMinutes 10.
SignExecutable = None
Expand All @@ -84,6 +89,7 @@ let internal buildSquirrelArgs parameters nugetPackage =
|> appendIfNotNullOrEmpty parameters.ReleaseDir "--releaseDir="
|> appendIfSome parameters.LoadingGif (sprintf "\"--loadingGif=%s\"")
|> appendIfSome parameters.SetupIcon (sprintf "\"--setupIcon=%s\"")
|> appendIfTrue parameters.NoMsi "--no-msi"
|> appendIfSome parameters.BootstrapperExe (sprintf "\"--bootstrapperExe=%s\"")
|> appendIfSome parameters.SignExecutable (fun s -> createSigningArgs parameters)
|> toText
Expand Down
9 changes: 9 additions & 0 deletions src/test/Test.FAKECore/SquirrelHelperSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ internal class When_using_the_default_parameters
It should_not_include_releasedir = () => Arguments.ShouldNotContain("--releaseDir=");
It should_not_include_loading_gif = () => Arguments.ShouldNotContain("--loadingGif=");
It should_not_include_setup_icon = () => Arguments.ShouldNotContain("--setupIcon=");
It should_not_include_nomsi = () => Arguments.ShouldNotContain("--no-msi");
It should_not_include_bootstrapper_exe = () => Arguments.ShouldNotContain("--bootstrapperExe=");
}

Expand Down Expand Up @@ -71,6 +72,14 @@ internal class When_specifying_setup_icon
It should_include_setup_icon = () => Arguments.ShouldContain("--setupIcon=" + SetupIcon);
}

internal class When_specifying_nomsi
: BuildArgumentsSpecsBase
{
Establish context = () => Parameters = Parameters.With(p => p.NoMsi, true);

It should_include_nomsi = () => Arguments.ShouldContain("--no-msi");
}

internal class When_specifying_bootstrapper_exe
: BuildArgumentsSpecsBase
{
Expand Down