2016-03-07 20:20:50 +00:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.IO;
|
|
|
|
using System.IO.Compression;
|
|
|
|
using System.Runtime.InteropServices;
|
|
|
|
using Microsoft.DotNet.Cli.Build.Framework;
|
2016-04-28 23:30:32 +00:00
|
|
|
using Microsoft.DotNet.InternalAbstractions;
|
2016-03-07 20:20:50 +00:00
|
|
|
using static Microsoft.DotNet.Cli.Build.Framework.BuildHelpers;
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Cli.Build
|
|
|
|
{
|
|
|
|
public static class PackageTargets
|
|
|
|
{
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
public static readonly string[] ProjectsToPack = new string[]
|
|
|
|
{
|
2016-05-04 05:30:31 +00:00
|
|
|
"dotnet-compile-fsc",
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
"Microsoft.DotNet.Cli.Utils",
|
2016-05-04 05:30:31 +00:00
|
|
|
"Microsoft.DotNet.Compiler.Common",
|
|
|
|
"Microsoft.DotNet.Files",
|
|
|
|
"Microsoft.DotNet.InternalAbstractions",
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
"Microsoft.DotNet.ProjectModel",
|
|
|
|
"Microsoft.DotNet.ProjectModel.Loader",
|
|
|
|
"Microsoft.DotNet.ProjectModel.Workspaces",
|
|
|
|
"Microsoft.Extensions.DependencyModel",
|
2016-05-04 05:30:31 +00:00
|
|
|
"Microsoft.Extensions.Testing.Abstractions"
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
};
|
|
|
|
|
2016-03-15 21:21:20 +00:00
|
|
|
[Target(nameof(PackageTargets.CopyCLISDKLayout),
|
2016-03-17 00:54:44 +00:00
|
|
|
nameof(PackageTargets.CopySharedHostLayout),
|
|
|
|
nameof(PackageTargets.CopySharedFxLayout),
|
2016-03-16 00:01:50 +00:00
|
|
|
nameof(PackageTargets.CopyCombinedFrameworkSDKHostLayout),
|
2016-04-24 20:01:52 +00:00
|
|
|
nameof(PackageTargets.CopyCombinedFrameworkSDKLayout))]
|
2016-03-07 20:20:50 +00:00
|
|
|
public static BuildTargetResult InitPackage(BuildTargetContext c)
|
|
|
|
{
|
|
|
|
Directory.CreateDirectory(Dirs.Packages);
|
|
|
|
return c.Success();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Target(nameof(PrepareTargets.Init),
|
|
|
|
nameof(PackageTargets.InitPackage),
|
|
|
|
nameof(PackageTargets.GenerateVersionBadge),
|
|
|
|
nameof(PackageTargets.GenerateCompressedFile),
|
|
|
|
nameof(InstallerTargets.GenerateInstaller),
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
nameof(PackageTargets.GenerateNugetPackages),
|
|
|
|
nameof(InstallerTargets.TestInstaller))]
|
2016-03-07 22:52:41 +00:00
|
|
|
[Environment("DOTNET_BUILD_SKIP_PACKAGING", null, "0", "false")]
|
2016-03-07 20:20:50 +00:00
|
|
|
public static BuildTargetResult Package(BuildTargetContext c)
|
|
|
|
{
|
|
|
|
return c.Success();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Target]
|
|
|
|
public static BuildTargetResult GenerateVersionBadge(BuildTargetContext c)
|
|
|
|
{
|
|
|
|
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
|
|
|
|
var versionSvg = Path.Combine(Dirs.RepoRoot, "resources", "images", "version_badge.svg");
|
|
|
|
var outputVersionSvg = c.BuildContext.Get<string>("VersionBadge");
|
|
|
|
|
|
|
|
var versionSvgContent = File.ReadAllText(versionSvg);
|
2016-03-29 00:51:36 +00:00
|
|
|
versionSvgContent = versionSvgContent.Replace("ver_number", buildVersion.NuGetVersion);
|
2016-03-07 20:20:50 +00:00
|
|
|
File.WriteAllText(outputVersionSvg, versionSvgContent);
|
|
|
|
|
|
|
|
return c.Success();
|
|
|
|
}
|
|
|
|
|
2016-03-15 01:54:45 +00:00
|
|
|
[Target]
|
|
|
|
public static BuildTargetResult CopyCLISDKLayout(BuildTargetContext c)
|
|
|
|
{
|
|
|
|
var cliSdkRoot = Path.Combine(Dirs.Output, "obj", "clisdk");
|
|
|
|
if (Directory.Exists(cliSdkRoot))
|
|
|
|
{
|
2016-03-15 21:06:54 +00:00
|
|
|
Utils.DeleteDirectory(cliSdkRoot);
|
2016-03-15 01:54:45 +00:00
|
|
|
}
|
|
|
|
|
2016-03-17 00:54:44 +00:00
|
|
|
Directory.CreateDirectory(cliSdkRoot);
|
|
|
|
Utils.CopyDirectoryRecursively(Path.Combine(Dirs.Stage2, "sdk"), cliSdkRoot, true);
|
2016-03-23 21:18:45 +00:00
|
|
|
FixPermissions(cliSdkRoot);
|
|
|
|
|
2016-03-17 00:54:44 +00:00
|
|
|
c.BuildContext["CLISDKRoot"] = cliSdkRoot;
|
|
|
|
return c.Success();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Target]
|
|
|
|
public static BuildTargetResult CopySharedHostLayout(BuildTargetContext c)
|
|
|
|
{
|
|
|
|
var sharedHostRoot = Path.Combine(Dirs.Output, "obj", "sharedHost");
|
|
|
|
if (Directory.Exists(sharedHostRoot))
|
2016-03-15 19:30:46 +00:00
|
|
|
{
|
2016-03-17 00:54:44 +00:00
|
|
|
Utils.DeleteDirectory(sharedHostRoot);
|
2016-03-15 19:30:46 +00:00
|
|
|
}
|
|
|
|
|
2016-03-17 00:54:44 +00:00
|
|
|
Directory.CreateDirectory(sharedHostRoot);
|
2016-03-15 19:30:46 +00:00
|
|
|
|
2016-03-17 00:54:44 +00:00
|
|
|
foreach (var file in Directory.GetFiles(Dirs.Stage2, "*", SearchOption.TopDirectoryOnly))
|
2016-03-15 01:54:45 +00:00
|
|
|
{
|
2016-03-17 00:54:44 +00:00
|
|
|
var destFile = file.Replace(Dirs.Stage2, sharedHostRoot);
|
2016-03-15 01:54:45 +00:00
|
|
|
File.Copy(file, destFile, true);
|
|
|
|
}
|
2016-03-23 21:18:45 +00:00
|
|
|
FixPermissions(sharedHostRoot);
|
2016-03-15 01:54:45 +00:00
|
|
|
|
2016-03-17 00:54:44 +00:00
|
|
|
c.BuildContext["SharedHostPublishRoot"] = sharedHostRoot;
|
|
|
|
return c.Success();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Target]
|
|
|
|
public static BuildTargetResult CopySharedFxLayout(BuildTargetContext c)
|
|
|
|
{
|
|
|
|
var sharedFxRoot = Path.Combine(Dirs.Output, "obj", "sharedFx");
|
|
|
|
if (Directory.Exists(sharedFxRoot))
|
|
|
|
{
|
|
|
|
Utils.DeleteDirectory(sharedFxRoot);
|
|
|
|
}
|
|
|
|
|
|
|
|
Directory.CreateDirectory(sharedFxRoot);
|
|
|
|
Utils.CopyDirectoryRecursively(Path.Combine(Dirs.Stage2, "shared"), sharedFxRoot, true);
|
2016-03-23 21:18:45 +00:00
|
|
|
FixPermissions(sharedFxRoot);
|
|
|
|
|
2016-03-17 00:54:44 +00:00
|
|
|
c.BuildContext["SharedFrameworkPublishRoot"] = sharedFxRoot;
|
2016-03-15 01:54:45 +00:00
|
|
|
return c.Success();
|
|
|
|
}
|
|
|
|
|
2016-03-16 00:01:50 +00:00
|
|
|
[Target]
|
|
|
|
public static BuildTargetResult CopyCombinedFrameworkSDKHostLayout(BuildTargetContext c)
|
|
|
|
{
|
|
|
|
var combinedRoot = Path.Combine(Dirs.Output, "obj", "combined-framework-sdk-host");
|
2016-03-17 00:54:44 +00:00
|
|
|
if (Directory.Exists(combinedRoot))
|
|
|
|
{
|
|
|
|
Utils.DeleteDirectory(combinedRoot);
|
|
|
|
}
|
2016-03-16 00:01:50 +00:00
|
|
|
|
|
|
|
string sdkPublishRoot = c.BuildContext.Get<string>("CLISDKRoot");
|
|
|
|
Utils.CopyDirectoryRecursively(sdkPublishRoot, combinedRoot);
|
|
|
|
|
|
|
|
string sharedFrameworkPublishRoot = c.BuildContext.Get<string>("SharedFrameworkPublishRoot");
|
|
|
|
Utils.CopyDirectoryRecursively(sharedFrameworkPublishRoot, combinedRoot);
|
|
|
|
|
|
|
|
string sharedHostPublishRoot = c.BuildContext.Get<string>("SharedHostPublishRoot");
|
|
|
|
Utils.CopyDirectoryRecursively(sharedHostPublishRoot, combinedRoot);
|
|
|
|
|
|
|
|
c.BuildContext["CombinedFrameworkSDKHostRoot"] = combinedRoot;
|
|
|
|
return c.Success();
|
|
|
|
}
|
|
|
|
|
2016-04-24 20:01:52 +00:00
|
|
|
[Target]
|
|
|
|
public static BuildTargetResult CopyCombinedFrameworkSDKLayout(BuildTargetContext c)
|
|
|
|
{
|
|
|
|
var combinedRoot = Path.Combine(Dirs.Output, "obj", "combined-framework-sdk");
|
|
|
|
if (Directory.Exists(combinedRoot))
|
|
|
|
{
|
|
|
|
Utils.DeleteDirectory(combinedRoot);
|
|
|
|
}
|
|
|
|
|
|
|
|
string sdkPublishRoot = c.BuildContext.Get<string>("CLISDKRoot");
|
|
|
|
Utils.CopyDirectoryRecursively(sdkPublishRoot, combinedRoot);
|
|
|
|
|
|
|
|
string sharedFrameworkPublishRoot = c.BuildContext.Get<string>("SharedFrameworkPublishRoot");
|
|
|
|
Utils.CopyDirectoryRecursively(sharedFrameworkPublishRoot, combinedRoot);
|
|
|
|
|
|
|
|
c.BuildContext["CombinedFrameworkSDKRoot"] = combinedRoot;
|
|
|
|
return c.Success();
|
|
|
|
}
|
|
|
|
|
2016-03-07 20:20:50 +00:00
|
|
|
[Target(nameof(PackageTargets.GenerateZip), nameof(PackageTargets.GenerateTarBall))]
|
|
|
|
public static BuildTargetResult GenerateCompressedFile(BuildTargetContext c)
|
|
|
|
{
|
|
|
|
return c.Success();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Target(nameof(PackageTargets.InitPackage))]
|
|
|
|
[BuildPlatforms(BuildPlatform.Windows)]
|
|
|
|
public static BuildTargetResult GenerateZip(BuildTargetContext c)
|
|
|
|
{
|
2016-03-16 00:01:50 +00:00
|
|
|
CreateZipFromDirectory(c.BuildContext.Get<string>("CombinedFrameworkSDKHostRoot"), c.BuildContext.Get<string>("CombinedFrameworkSDKHostCompressedFile"));
|
2016-04-24 20:01:52 +00:00
|
|
|
CreateZipFromDirectory(c.BuildContext.Get<string>("CombinedFrameworkSDKRoot"), c.BuildContext.Get<string>("CombinedFrameworkSDKCompressedFile"));
|
2016-04-05 03:13:13 +00:00
|
|
|
CreateZipFromDirectory(Path.Combine(Dirs.Stage2Symbols, "sdk"), c.BuildContext.Get<string>("SdkSymbolsCompressedFile"));
|
|
|
|
|
2016-03-07 20:20:50 +00:00
|
|
|
return c.Success();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Target(nameof(PackageTargets.InitPackage))]
|
|
|
|
[BuildPlatforms(BuildPlatform.Unix)]
|
|
|
|
public static BuildTargetResult GenerateTarBall(BuildTargetContext c)
|
|
|
|
{
|
2016-03-16 00:01:50 +00:00
|
|
|
CreateTarBallFromDirectory(c.BuildContext.Get<string>("CombinedFrameworkSDKHostRoot"), c.BuildContext.Get<string>("CombinedFrameworkSDKHostCompressedFile"));
|
2016-03-07 20:20:50 +00:00
|
|
|
|
2016-04-05 03:13:13 +00:00
|
|
|
CreateTarBallFromDirectory(Path.Combine(Dirs.Stage2Symbols, "sdk"), c.BuildContext.Get<string>("SdkSymbolsCompressedFile"));
|
|
|
|
|
2016-03-07 20:20:50 +00:00
|
|
|
return c.Success();
|
|
|
|
}
|
|
|
|
|
|
|
|
[Target]
|
|
|
|
public static BuildTargetResult GenerateNugetPackages(BuildTargetContext c)
|
|
|
|
{
|
2016-05-04 19:20:13 +00:00
|
|
|
var versionSuffix = c.BuildContext.Get<BuildVersion>("BuildVersion").CommitCountString;
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
var configuration = c.BuildContext.Get<string>("Configuration");
|
|
|
|
|
2016-03-07 20:20:50 +00:00
|
|
|
var env = GetCommonEnvVars(c);
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
var dotnet = DotNetCli.Stage2;
|
|
|
|
|
|
|
|
var packagingBuildBasePath = Path.Combine(Dirs.Stage2Compilation, "forPackaging");
|
|
|
|
|
|
|
|
FS.Mkdirp(Dirs.PackagesIntermediate);
|
|
|
|
FS.Mkdirp(Dirs.Packages);
|
|
|
|
|
|
|
|
foreach (var projectName in ProjectsToPack)
|
|
|
|
{
|
|
|
|
var projectFile = Path.Combine(Dirs.RepoRoot, "src", projectName, "project.json");
|
|
|
|
|
|
|
|
dotnet.Pack(
|
2016-05-02 18:32:24 +00:00
|
|
|
projectFile,
|
|
|
|
"--no-build",
|
|
|
|
"--build-base-path", packagingBuildBasePath,
|
|
|
|
"--output", Dirs.PackagesIntermediate,
|
|
|
|
"--configuration", configuration,
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
"--version-suffix", versionSuffix)
|
2016-03-07 20:20:50 +00:00
|
|
|
.Execute()
|
|
|
|
.EnsureSuccessful();
|
Extract dotnet-compile-fsc into a standalone command
Add basic Tests for dotnet-compile-fsc
Package Targets execute before TestTargets. Use Generated Nuget Packages in TestTargets. Generate Nuget packages on all platforms, and in C#
Fix bug in dotnet-restore, change fsharp new template, add support for native assets in DependencyContextCsvReader
copy fsc.exe to temp directory instead of package cache
fix rebase error
fix issue
fixes
fixes
fix
temporarily disable debian package e2e testing
fixes
bump fsc version
update fsc version
fix rebase errors
WIP update fsc tool
WIP, rebased and working again, need to solve issues with System.CommandLine
Working state for packaged, command, fsc.exe bugging out with dlopen(, 1): no suitable image found.
execute fsc like a unpublished standalone app
fixup after rebase
working? internet is out
working
cleanup
More cleanup, and run the debian package tests during the Test phase of the build.
update FSharp Test Projects NetStandard Library Version
Update Version Suffix when packing TestPackages. This will enable packing with the right dependency versions on Windows.
update dotnet-test version
Undo the reordering of the build
fix test package project pathsj
ignore net451 build failures for test packages which we need to build on non-windows
update dependency of desktop test app
add dotnetcli feed to nuget config for fsharp dotnet new
update deps after rebase
update dependency of dotnet-compile-fsc
pass args before commandPath when using muxer for tools
adjust testpackage cleaning not to clean packages which are also generated as part of the product from the nuget cache.
undo
Pass projectJson to pack instead of using WorkingDirectory
fix path separators using depsjsoncommandresolver on windows, fix building only specific frameworks for testpackages on non-windows.
PR Feedback
rebase
overwrite fsc runtimeconfig
2016-03-12 00:41:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var packageFiles = Directory.EnumerateFiles(Dirs.PackagesIntermediate, "*.nupkg");
|
|
|
|
|
|
|
|
foreach (var packageFile in packageFiles)
|
|
|
|
{
|
|
|
|
if (!packageFile.EndsWith(".symbols.nupkg"))
|
|
|
|
{
|
|
|
|
var destinationPath = Path.Combine(Dirs.Packages, Path.GetFileName(packageFile));
|
|
|
|
File.Copy(packageFile, destinationPath, overwrite: true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-03-07 20:20:50 +00:00
|
|
|
return c.Success();
|
|
|
|
}
|
|
|
|
|
|
|
|
internal static Dictionary<string, string> GetCommonEnvVars(BuildTargetContext c)
|
|
|
|
{
|
|
|
|
// Set up the environment variables previously defined by common.sh/ps1
|
|
|
|
// This is overkill, but I want to cover all the variables used in all OSes (including where some have the same names)
|
|
|
|
var buildVersion = c.BuildContext.Get<BuildVersion>("BuildVersion");
|
|
|
|
var configuration = c.BuildContext.Get<string>("Configuration");
|
2016-04-28 23:30:32 +00:00
|
|
|
var architecture = RuntimeEnvironment.RuntimeArchitecture;
|
2016-03-07 20:20:50 +00:00
|
|
|
var env = new Dictionary<string, string>()
|
|
|
|
{
|
2016-04-28 23:30:32 +00:00
|
|
|
{ "RID", RuntimeEnvironment.GetRuntimeIdentifier() },
|
|
|
|
{ "OSNAME", RuntimeEnvironment.OperatingSystem },
|
2016-03-07 20:20:50 +00:00
|
|
|
{ "TFM", "dnxcore50" },
|
|
|
|
{ "REPOROOT", Dirs.RepoRoot },
|
|
|
|
{ "OutputDir", Dirs.Output },
|
|
|
|
{ "Stage1Dir", Dirs.Stage1 },
|
|
|
|
{ "Stage1CompilationDir", Dirs.Stage1Compilation },
|
|
|
|
{ "Stage2Dir", Dirs.Stage2 },
|
|
|
|
{ "STAGE2_DIR", Dirs.Stage2 },
|
|
|
|
{ "Stage2CompilationDir", Dirs.Stage2Compilation },
|
|
|
|
{ "PackageDir", Path.Combine(Dirs.Packages) }, // Legacy name
|
|
|
|
{ "TestBinRoot", Dirs.TestOutput },
|
|
|
|
{ "TestPackageDir", Dirs.TestPackages },
|
|
|
|
{ "MajorVersion", buildVersion.Major.ToString() },
|
|
|
|
{ "MinorVersion", buildVersion.Minor.ToString() },
|
|
|
|
{ "PatchVersion", buildVersion.Patch.ToString() },
|
|
|
|
{ "CommitCountVersion", buildVersion.CommitCountString },
|
|
|
|
{ "COMMIT_COUNT_VERSION", buildVersion.CommitCountString },
|
|
|
|
{ "DOTNET_CLI_VERSION", buildVersion.SimpleVersion },
|
|
|
|
{ "DOTNET_MSI_VERSION", buildVersion.GenerateMsiVersion() },
|
|
|
|
{ "VersionSuffix", buildVersion.VersionSuffix },
|
|
|
|
{ "CONFIGURATION", configuration },
|
|
|
|
{ "ARCHITECTURE", architecture }
|
|
|
|
};
|
|
|
|
|
|
|
|
return env;
|
|
|
|
}
|
2016-03-09 05:52:34 +00:00
|
|
|
|
|
|
|
private static void CreateZipFromDirectory(string directory, string artifactPath)
|
|
|
|
{
|
|
|
|
if (File.Exists(artifactPath))
|
|
|
|
{
|
|
|
|
File.Delete(artifactPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
ZipFile.CreateFromDirectory(directory, artifactPath, CompressionLevel.Optimal, false);
|
|
|
|
}
|
2016-03-09 06:42:16 +00:00
|
|
|
|
|
|
|
private static void CreateTarBallFromDirectory(string directory, string artifactPath)
|
|
|
|
{
|
|
|
|
if (File.Exists(artifactPath))
|
|
|
|
{
|
|
|
|
File.Delete(artifactPath);
|
|
|
|
}
|
|
|
|
|
|
|
|
Cmd("tar", "-czf", artifactPath, "-C", directory, ".")
|
|
|
|
.Execute()
|
|
|
|
.EnsureSuccessful();
|
|
|
|
}
|
2016-03-23 21:18:45 +00:00
|
|
|
|
|
|
|
private static void FixPermissions(string directory)
|
|
|
|
{
|
|
|
|
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
|
|
|
{
|
|
|
|
// Reset everything to user readable/writeable and group and world readable.
|
|
|
|
FS.ChmodAll(directory, "*", "644");
|
|
|
|
|
|
|
|
// Now make things that should be executable, executable.
|
|
|
|
FS.FixModeFlags(directory);
|
|
|
|
}
|
|
|
|
}
|
2016-03-07 20:20:50 +00:00
|
|
|
}
|
|
|
|
}
|