Skip to content

Commit

Permalink
Fix CI build removing the dotnet new template nupkg (#835)
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsonax authored Jun 11, 2020
1 parent 5735917 commit fba2bc9
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 13 deletions.
Binary file modified Build/NightlyBuild/NightlyBuilder.exe
Binary file not shown.
Binary file modified Build/NightlyBuild/NightlyBuilder.pdb
Binary file not shown.
5 changes: 1 addition & 4 deletions Build/Scripts/Package Binary CI Script.bat
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
cd %~dp0./../../Build/NightlyBuild/

:: delete old nupkg files, so failed packages don't generate artifacts
for /r %%i in (NuGetPackages\*.nupkg) do del %%i

NightlyBuilder.exe NoDocs=true NoBuild=true NoTests=true NonInteractive=true
NightlyBuilder.exe NoDocs=true NoBuild=true NoTests=true NonInteractive=true NoCleanNugetPackageTargetDir=true

if %ERRORLEVEL% NEQ 0 (
echo NightlyBuilder.exe returned with error code %ERRORLEVEL%
Expand Down
Binary file modified Build/Scripts/bin/VersionUpdater.exe
Binary file not shown.
Binary file modified Build/Scripts/bin/VersionUpdater.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion Source/DualityTemplates/DualityTemplates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<ItemGroup>
<NugetPackages Include="$(OutputPath)\*.nupkg" />
</ItemGroup>

<Message Importance="High" Text="Copying @(NugetPackages) to $(MSBuildProjectDirectory)\..\..\Build\NightlyBuild\NuGetPackages" />
<Copy SourceFiles="@(NugetPackages)" DestinationFolder="$(MSBuildProjectDirectory)\..\..\Build\NightlyBuild\NuGetPackages" />
</Target>

Expand Down
1 change: 1 addition & 0 deletions Tools/NightlyBuilder/ConfigFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public sealed class ConfigFile
public string CopyPackageTo { get; set; }
public string NuGetPath { get; set; }
public string NuGetPackageSpecsDir { get; set; }
public bool NoCleanNugetPackageTargetDir { get; set; }
public string NuGetPackageTargetDir { get; set; }
public bool NoBuild { get; set; }
public bool NoTests { get; set; }
Expand Down
21 changes: 13 additions & 8 deletions Tools/NightlyBuilder/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -86,18 +86,23 @@ public static void Main(string[] args)

public static void PerformNightlyBuild(ConfigFile config)
{
Console.WriteLine("============================= Clean NuGet Packages ============================");
if (Directory.Exists(config.NuGetPackageTargetDir))
if (!config.NoCleanNugetPackageTargetDir)
{
Console.WriteLine("Deleting old package files in '{0}'...", config.NuGetPackageTargetDir);
foreach (string file in Directory.EnumerateFiles(config.NuGetPackageTargetDir, "*.nupkg", SearchOption.TopDirectoryOnly))
Console.WriteLine("============================= Clean NuGet Packages ============================");
if (Directory.Exists(config.NuGetPackageTargetDir))
{
File.Delete(file);
Console.WriteLine("Deleting old package files in '{0}'...", config.NuGetPackageTargetDir);
foreach (string file in Directory.EnumerateFiles(config.NuGetPackageTargetDir, "*.nupkg",
SearchOption.TopDirectoryOnly))
{
File.Delete(file);
}
}

Console.WriteLine("===============================================================================");
Console.WriteLine();
Console.WriteLine();
}
Console.WriteLine("===============================================================================");
Console.WriteLine();
Console.WriteLine();

string packagePath = Path.Combine(config.PackageDir, config.PackageName);
FileVersionInfo versionCore = null;
Expand Down

0 comments on commit fba2bc9

Please sign in to comment.