diff --git a/.gitignore b/.gitignore index 1a111a2ca..cbf9d62d8 100644 --- a/.gitignore +++ b/.gitignore @@ -34,9 +34,6 @@ _ReSharper.** ~$* *~ -# NuGet Stuff -*.nupkg -*.snupkg # Exclude everything in packages directory except the packages/build directory **/[Pp]ackages/* !**/[Pp]ackages/build/ @@ -61,4 +58,3 @@ demo.* *.tui/ *.dotCover -/local_packages/ diff --git a/NativeAot/PackTerminalGui.ps1 b/NativeAot/PackTerminalGui.ps1 deleted file mode 100644 index ea6bff054..000000000 --- a/NativeAot/PackTerminalGui.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -# Step 1: Build and pack Terminal.Gui -dotnet build ../Terminal.Gui/Terminal.Gui.csproj --configuration Release -dotnet pack ../Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ../local_packages - -# Step 2: Restore NativeAot with the new package -dotnet restore ./NativeAot.csproj --source ./local_packages - -# Step 3: Build NativeAot -dotnet build ./NativeAot.csproj --configuration Release diff --git a/NativeAot/PackTerminalGui.sh b/NativeAot/PackTerminalGui.sh deleted file mode 100644 index ab0cc7e17..000000000 --- a/NativeAot/PackTerminalGui.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# Step 1: Build and pack Terminal.Gui -dotnet build ../Terminal.Gui/Terminal.Gui.csproj --configuration Release -dotnet pack ../Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ../local_packages - -# Step 2: Restore NativeAot with the new package -dotnet restore ./NativeAot.csproj --source ./local_packages - -# Step 3: Build NativeAot -dotnet build ./NativeAot.csproj --configuration Release diff --git a/SelfContained/PackTerminalGui.ps1 b/SelfContained/PackTerminalGui.ps1 deleted file mode 100644 index 6e5cd4192..000000000 --- a/SelfContained/PackTerminalGui.ps1 +++ /dev/null @@ -1,9 +0,0 @@ -# Step 1: Build and pack Terminal.Gui -dotnet build ../Terminal.Gui/Terminal.Gui.csproj --configuration Release -dotnet pack ../Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ../local_packages - -# Step 2: Restore SelfContained with the new package -dotnet restore ./SelfContained.csproj --source ./local_packages - -# Step 3: Build SelfContained -dotnet build ./SelfContained.csproj --configuration Release diff --git a/SelfContained/PackTerminalGui.sh b/SelfContained/PackTerminalGui.sh deleted file mode 100644 index d2cba3e87..000000000 --- a/SelfContained/PackTerminalGui.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# Step 1: Build and pack Terminal.Gui -dotnet build ../Terminal.Gui/Terminal.Gui.csproj --configuration Release -dotnet pack ../Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ../local_packages - -# Step 2: Restore SelfContained with the new package -dotnet restore ./SelfContained.csproj --source ./local_packages - -# Step 3: Build SelfContained -dotnet build ./SelfContained.csproj --configuration Release diff --git a/Terminal.Gui/Terminal.Gui.csproj b/Terminal.Gui/Terminal.Gui.csproj index b11044a16..08813a50f 100644 --- a/Terminal.Gui/Terminal.Gui.csproj +++ b/Terminal.Gui/Terminal.Gui.csproj @@ -1,4 +1,4 @@ - + @@ -142,4 +142,36 @@ Miguel de Icaza, Tig Kindel (@tig), @BDisp + + + + + $(MSBuildThisFileDirectory)..\local_packages\ + + $(MSBuildThisFileDirectory)bin\$(Configuration)\ + + + + + + + + + + + + + + + + + + + + diff --git a/UnitTests/LocalPackagesTests.cs b/UnitTests/LocalPackagesTests.cs new file mode 100644 index 000000000..5de7b371f --- /dev/null +++ b/UnitTests/LocalPackagesTests.cs @@ -0,0 +1,33 @@ +namespace Terminal.Gui; + +public class LocalPackagesTests +{ + private readonly string _localPackagesPath; + + public LocalPackagesTests () + { + // Define the local_packages path relative to the solution directory + _localPackagesPath = Path.Combine (Directory.GetCurrentDirectory (), "..", "..", "..", "..", "local_packages"); + } + + [Fact] + public void LocalPackagesFolderExists () + { + Assert.True (Directory.Exists (_localPackagesPath), + $"The local_packages folder does not exist: {_localPackagesPath}"); + } + + [Fact] + public void NupkgFilesExist () + { + var nupkgFiles = Directory.GetFiles (_localPackagesPath, "*.nupkg"); + Assert.NotEmpty (nupkgFiles); + } + + [Fact] + public void SnupkgFilesExist () + { + var snupkgFiles = Directory.GetFiles (_localPackagesPath, "*.snupkg"); + Assert.NotEmpty (snupkgFiles); + } +} \ No newline at end of file diff --git a/local_packages/Terminal.Gui.2.0.0.nupkg b/local_packages/Terminal.Gui.2.0.0.nupkg new file mode 100644 index 000000000..c0ee67dd0 Binary files /dev/null and b/local_packages/Terminal.Gui.2.0.0.nupkg differ diff --git a/local_packages/Terminal.Gui.2.0.0.snupkg b/local_packages/Terminal.Gui.2.0.0.snupkg new file mode 100644 index 000000000..301976b83 Binary files /dev/null and b/local_packages/Terminal.Gui.2.0.0.snupkg differ