From 58400fe74ea15376216b4997ef678c1bf9c796a5 Mon Sep 17 00:00:00 2001 From: Patrik Svensson Date: Fri, 29 Jan 2021 20:57:36 +0100 Subject: [PATCH] Fix code generation Previous changes introduced some bugs to the code generation scripts and templates, which now have been fixed. --- resources/scripts/Generate-Spinners.ps1 | 2 +- resources/scripts/Generator/Templates/Color.Generated.template | 1 - .../Generator/Templates/ColorPalette.Generated.template | 3 +-- .../scripts/Generator/Templates/ColorTable.Generated.template | 3 +-- resources/scripts/Generator/Templates/Emoji.Generated.template | 1 - .../scripts/Generator/Templates/Spinner.Generated.template | 1 - src/Spectre.Console/Color.Generated.cs | 1 - src/Spectre.Console/Emoji.Generated.cs | 1 - src/Spectre.Console/Internal/Colors/ColorPalette.Generated.cs | 1 - src/Spectre.Console/Internal/Colors/ColorTable.Generated.cs | 1 - src/Spectre.Console/Widgets/Progress/Spinner.Generated.cs | 1 - 11 files changed, 3 insertions(+), 13 deletions(-) diff --git a/resources/scripts/Generate-Spinners.ps1 b/resources/scripts/Generate-Spinners.ps1 index 557cb44..1c605aa 100644 --- a/resources/scripts/Generate-Spinners.ps1 +++ b/resources/scripts/Generate-Spinners.ps1 @@ -19,4 +19,4 @@ if(!$?) { Pop-Location # Copy the files to the correct location -Copy-Item (Join-Path "$Output" "Spinner.Generated.cs") -Destination "$Source/Progress/Spinner.Generated.cs" +Copy-Item (Join-Path "$Output" "Spinner.Generated.cs") -Destination "$Source/Widgets/Progress/Spinner.Generated.cs" diff --git a/resources/scripts/Generator/Templates/Color.Generated.template b/resources/scripts/Generator/Templates/Color.Generated.template index 7f3d18f..3b0ba92 100644 --- a/resources/scripts/Generator/Templates/Color.Generated.template +++ b/resources/scripts/Generator/Templates/Color.Generated.template @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Generated {{ date.now | date.to_string `%F %R` }} // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/resources/scripts/Generator/Templates/ColorPalette.Generated.template b/resources/scripts/Generator/Templates/ColorPalette.Generated.template index 0e3f3ca..725a64d 100644 --- a/resources/scripts/Generator/Templates/ColorPalette.Generated.template +++ b/resources/scripts/Generator/Templates/ColorPalette.Generated.template @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Generated {{ date.now | date.to_string `%F %R` }} // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -10,7 +9,7 @@ using System.Collections.Generic; -namespace Spectre.Console.Internal +namespace Spectre.Console { internal static partial class ColorPalette { diff --git a/resources/scripts/Generator/Templates/ColorTable.Generated.template b/resources/scripts/Generator/Templates/ColorTable.Generated.template index 0cd0205..bfd3736 100644 --- a/resources/scripts/Generator/Templates/ColorTable.Generated.template +++ b/resources/scripts/Generator/Templates/ColorTable.Generated.template @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Generated {{ date.now | date.to_string `%F %R` }} // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. @@ -11,7 +10,7 @@ using System; using System.Collections.Generic; -namespace Spectre.Console.Internal +namespace Spectre.Console { internal static partial class ColorTable { diff --git a/resources/scripts/Generator/Templates/Emoji.Generated.template b/resources/scripts/Generator/Templates/Emoji.Generated.template index c9e8cfc..01eaa0f 100644 --- a/resources/scripts/Generator/Templates/Emoji.Generated.template +++ b/resources/scripts/Generator/Templates/Emoji.Generated.template @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Generated {{ date.now | date.to_string `%F %R` }} // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/resources/scripts/Generator/Templates/Spinner.Generated.template b/resources/scripts/Generator/Templates/Spinner.Generated.template index ffc12a0..994a831 100644 --- a/resources/scripts/Generator/Templates/Spinner.Generated.template +++ b/resources/scripts/Generator/Templates/Spinner.Generated.template @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Generated {{ date.now | date.to_string `%F %R` }} // // Partly generated from // https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json diff --git a/src/Spectre.Console/Color.Generated.cs b/src/Spectre.Console/Color.Generated.cs index 2e5b699..2a8208f 100644 --- a/src/Spectre.Console/Color.Generated.cs +++ b/src/Spectre.Console/Color.Generated.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Generated 2020-09-18 10:42 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/src/Spectre.Console/Emoji.Generated.cs b/src/Spectre.Console/Emoji.Generated.cs index a546d67..2b1d13b 100644 --- a/src/Spectre.Console/Emoji.Generated.cs +++ b/src/Spectre.Console/Emoji.Generated.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Generated 2020-09-18 11:14 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/src/Spectre.Console/Internal/Colors/ColorPalette.Generated.cs b/src/Spectre.Console/Internal/Colors/ColorPalette.Generated.cs index f985769..23fa0bb 100644 --- a/src/Spectre.Console/Internal/Colors/ColorPalette.Generated.cs +++ b/src/Spectre.Console/Internal/Colors/ColorPalette.Generated.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Generated 2020-09-18 10:42 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/src/Spectre.Console/Internal/Colors/ColorTable.Generated.cs b/src/Spectre.Console/Internal/Colors/ColorTable.Generated.cs index 0c84523..229c657 100644 --- a/src/Spectre.Console/Internal/Colors/ColorTable.Generated.cs +++ b/src/Spectre.Console/Internal/Colors/ColorTable.Generated.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Generated 2020-09-18 10:42 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. diff --git a/src/Spectre.Console/Widgets/Progress/Spinner.Generated.cs b/src/Spectre.Console/Widgets/Progress/Spinner.Generated.cs index ba1b45e..26c61a1 100644 --- a/src/Spectre.Console/Widgets/Progress/Spinner.Generated.cs +++ b/src/Spectre.Console/Widgets/Progress/Spinner.Generated.cs @@ -1,7 +1,6 @@ //------------------------------------------------------------------------------ // // This code was generated by a tool. -// Generated 2020-12-08 23:55 // // Partly generated from // https://github.com/sindresorhus/cli-spinners/blob/master/spinners.json