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

MSI installer #38

Merged
merged 17 commits into from
Oct 26, 2018
Merged
Show file tree
Hide file tree
Changes from 2 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
21 changes: 21 additions & 0 deletions installer/build/scripts/Build.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,33 @@ open System
open System.Diagnostics
open System.IO
open Fake
open Fake.Git
open Products.Products
open Products.Paths
open Products
open System.Text
open Fake.FileHelper
open Fake.AssemblyInfoFile

module Builder =

let patchAssemblyInformation (version:Version) =
let version = version.FullVersion
let commitHash = Information.getCurrentHash()
CreateCSharpAssemblyInfo (MsiDir @@ "Properties/AssemblyInfo.cs")
[Attribute.Title "Installer"
Attribute.Description "Elasticsearch ODBC Installer."
Attribute.Guid "44555887-c439-470c-944d-8866ec3d7067"
Attribute.Product "Elasticsearch ODBC Installer"
Attribute.Metadata("GitBuildHash", commitHash)
Attribute.Company "Elasticsearch B.V."
Attribute.Copyright "Elastic License. Copyright Elasticsearch."
Attribute.Trademark "Elasticsearch is a trademark of Elasticsearch B.V."
Attribute.Version version
Attribute.FileVersion version
Attribute.InformationalVersion version // Attribute.Version and Attribute.FileVersion normalize the version number, so retain the prelease suffix
]

let Sign file (product : ProductVersions) =
tracefn "Signing MSI"
let release = getBuildParam "release" = "1"
Expand Down Expand Up @@ -70,6 +89,8 @@ module Builder =
product.Versions
|> List.iter(fun version ->

patchAssemblyInformation (version)

let exitCode = ExecProcess (fun info ->
info.FileName <- sprintf "%sOdbcInstaller" MsiBuildDir
info.WorkingDirectory <- MsiDir
Expand Down
1 change: 1 addition & 0 deletions installer/build/scripts/Commandline.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ Target:
match candidate.ToLowerInvariant() with
| "buildinstaller"
| "clean"
| "help"
| "release" -> Some candidate
codebrain marked this conversation as resolved.
Show resolved Hide resolved
| _ -> None

Expand Down
11 changes: 5 additions & 6 deletions installer/src/Installer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("ODBCInstaller")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyTitle("Installer")]
[assembly: AssemblyDescription("Elasticsearch ODBC Installer.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("ODBCInstaller")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyCompany("Elasticsearch B.V.")]
[assembly: AssemblyProduct("Elasticsearch ODBC Installer")]
[assembly: AssemblyCopyright("Copyright Elasticsearch B.V. ©")]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this include the year?

[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down