Replace CHANGES.txt with autogenerated COMPONENTS.txt
This commit is contained in:
Родитель
b4de5c9113
Коммит
20bf3bc8d1
|
@ -5,10 +5,4 @@ MSI installer which bundles multiple NUnit 3 components.
|
|||
|
||||
##Building
|
||||
|
||||
NUnit uses Cake (http://cakebuild.net) to fetch the assemblies for install, and build the installer. Further information is in [BUILDING.md](BUILDING.md).
|
||||
|
||||
##Release
|
||||
|
||||
When doing a new version, the following items need to be updated manually:
|
||||
* Version string in `build.cake`
|
||||
* Changelog, at `resources/CHANGES.txt`
|
||||
NUnit uses Cake (http://cakebuild.net) to fetch the assemblies for install, and build the installer. Further information is in [BUILDING.md](BUILDING.md).
|
28
build.cake
28
build.cake
|
@ -1,3 +1,7 @@
|
|||
#addin "Cake.ExtendedNuGet"
|
||||
#addin "nuget:?package=NuGet.Core&version=2.8.6"
|
||||
#addin "Cake.FileHelpers"
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// ARGUMENTS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -43,6 +47,7 @@ var DISTRIBUTION_DIR = ROOT_DIR + "distribution/";
|
|||
var IMAGE_DIR = ROOT_DIR + "image/";
|
||||
var IMAGE_ADDINS_DIR = IMAGE_DIR + "addins/";
|
||||
var ZIP_FILE = string.Format("{0}NUnit.Console-{1}.zip", DISTRIBUTION_DIR, version);
|
||||
var COMPONENTS_FILE_PATH = IMAGE_DIR + "COMPONENTS.txt";
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// TASK
|
||||
|
@ -90,7 +95,29 @@ Task("CreateImage")
|
|||
CopyPackageContents(packageDir, IMAGE_ADDINS_DIR);
|
||||
});
|
||||
|
||||
Task("WriteComponentsFile")
|
||||
.IsDependentOn("Clean")
|
||||
.IsDependentOn("FetchPackages")
|
||||
.Does(context =>
|
||||
{
|
||||
List<string> lines = new List<string> { "This package contains the following components:", "" };
|
||||
|
||||
var packageDirs = new [] { RUNNER_PACKAGES_DIR, EXTENSION_PACKAGES_DIR };
|
||||
|
||||
foreach (var packageDir in packageDirs)
|
||||
{
|
||||
foreach(var nupkgPath in GetFiles(packageDir + "*/*.nupkg"))
|
||||
{
|
||||
var nupkg = new ZipPackage(nupkgPath.MakeAbsolute(context.Environment).FullPath);
|
||||
lines.Add(string.Format("{0} - {1}{2}{3}{2}", nupkg.Id, nupkg.Version, Environment.NewLine, nupkg.Summary));
|
||||
}
|
||||
}
|
||||
|
||||
FileWriteLines(COMPONENTS_FILE_PATH, lines.ToArray());
|
||||
});
|
||||
|
||||
Task("PackageMsi")
|
||||
.IsDependentOn("WriteComponentsFile")
|
||||
.IsDependentOn("CreateImage")
|
||||
.Does(() =>
|
||||
{
|
||||
|
@ -107,6 +134,7 @@ Task("PackageMsi")
|
|||
});
|
||||
|
||||
Task("PackageZip")
|
||||
.IsDependentOn("WriteComponentsFile")
|
||||
.IsDependentOn("CreateImage")
|
||||
.Does(() =>
|
||||
{
|
||||
|
|
11
build.ps1
11
build.ps1
|
@ -13,11 +13,14 @@ $TOOLS_DIR = Join-Path $PSScriptRoot "tools"
|
|||
$NUGET_EXE = Join-Path $TOOLS_DIR "nuget.exe"
|
||||
$CAKE_EXE = Join-Path $TOOLS_DIR "Cake/Cake.exe"
|
||||
|
||||
# Experimental currently required due to https://github.com/Redth/Cake.ExtendedNuGet/issues/7
|
||||
$UseExperimental = "-experimental"
|
||||
|
||||
# Should we use experimental build of Roslyn?
|
||||
$UseExperimental = "";
|
||||
if($Experimental.IsPresent) {
|
||||
$UseExperimental = "-experimental"
|
||||
}
|
||||
#$UseExperimental = "";
|
||||
#if($Experimental.IsPresent) {
|
||||
# $UseExperimental = "-experimental"
|
||||
#}
|
||||
|
||||
# Is this a dry run?
|
||||
$UseDryRun = "";
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<Include>
|
||||
<Fragment>
|
||||
<ComponentGroup Id="NUNIT.COMMON" Directory="INSTALLDIR">
|
||||
<Component Id="CHANGES.txt" Location="local" Guid="1FC58664-BC75-4EB5-B67C-B439B1870C63">
|
||||
<File Id="CHANGES.txt" Source="$(var.InstallImage)\CHANGES.txt" />
|
||||
<Component Id="COMPONENTS.txt" Location="local" Guid="DD64E89E-8ADC-42F7-8F53-6594A97C291C">
|
||||
<File Id="COMPONENTS.txt" Source="$(var.InstallImage)\COMPONENTS.txt" />
|
||||
</Component>
|
||||
<Component Id="LICENSE.txt" Location="local" Guid="310C1DF5-BF3B-4758-B1BC-8B40D3F75E62">
|
||||
<File Id="LICENSE.txt" Source="$(var.InstallImage)\LICENSE.txt" />
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
NUnit msi Installer 3.5.0 - October 12th, 2016
|
||||
|
||||
* Framework is no longer installed, now solely distributed via NuGet.
|
||||
|
||||
Components Installed:
|
||||
* NUnit.Engine 3.4.1
|
||||
* NUnit.Console 3.4.1
|
||||
* NUnit.Extension.VSProjectLoader 3.4.1
|
||||
* NUnit.Extension.NUnitProjectLoader 3.4.1
|
||||
* NUnit.Extension.NUnitV2Driver 3.4.1
|
||||
* NUnit.Extension.NUnitV2ResultWriter 3.4.1
|
||||
* NUnit.Extension.TeamCityEventListener 1.0.2
|
|
@ -1,4 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Cake" version="0.16.1" />
|
||||
<package id="Cake" version="0.17.0" />
|
||||
</packages>
|
||||
|
|
Загрузка…
Ссылка в новой задаче