Browse Source

Using scripts to build release for NativeAot and SelfContained.

BDisp 10 months ago
parent
commit
5b108a9261

+ 1 - 7
.github/workflows/dotnet-core.yml

@@ -90,14 +90,8 @@ jobs:
         dotnet-version: 8.x
         dotnet-quality: 'ga'
 
-    - name: Create local_packages Directory
-      run: mkdir -p local_packages
-
     - name: Pack Release
-      run: dotnet pack --configuration Release --output ./local_packages
-
-    - name: Restore dependencies
-      run: dotnet restore --source ./local_packages
+      run: dotnet pack ./Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ./local_packages
 
     - name: Build Release
       run: dotnet build --configuration Release

+ 1 - 0
.gitignore

@@ -61,3 +61,4 @@ demo.*
 *.tui/
 
 *.dotCover
+/local_packages/

+ 8 - 0
NativeAot/PackTerminalGui.ps1

@@ -0,0 +1,8 @@
+# Step 1: Build and pack Terminal.Gui
+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

+ 10 - 0
NativeAot/PackTerminalGui.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# Step 1: Build and pack Terminal.Gui
+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

+ 8 - 0
SelfContained/PackTerminalGui.ps1

@@ -0,0 +1,8 @@
+# Step 1: Build and pack Terminal.Gui
+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

+ 10 - 0
SelfContained/PackTerminalGui.sh

@@ -0,0 +1,10 @@
+#!/bin/bash
+
+# Step 1: Build and pack Terminal.Gui
+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

+ 2 - 6
nuget.config

@@ -9,18 +9,14 @@
     <!--To inherit the global NuGet package sources remove the <clear/> line below -->
     <clear />
     <add key="nuget" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
-    <add key="LocalPackages" value="Terminal.Gui/bin/Release" />
-    <add key="local_packages" value="./local_packages" />
+    <add key="LocalPackages" value="./local_packages" />
   </packageSources>
   <packageSourceMapping>
     <packageSource key="nuget">
       <package pattern="*" />
     </packageSource>
 	<packageSource key="LocalPackages">
-	  <package pattern="Terminal.Gui" />
-	</packageSource>
-	<packageSource key="local_packages">
-       <package pattern="Terminal.Gui" />
+       <package pattern="Terminal.Gui*" />
 	</packageSource>
   </packageSourceMapping>
 </configuration>