diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 39e5db0ca..2b7f1c492 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -26,10 +26,6 @@ jobs: uses: actions/setup-dotnet@v1.7.2 with: dotnet-version: '8.0.300' - - name: Replace global.json in root dir - run: | - # Use global.json from src/GWallet.Frontend.Maui as it specifies .NET8 - cp ./src/GWallet.Frontend.Maui/global.json ./ - name: install maui workload run: dotnet workload install maui - name: configure @@ -226,10 +222,6 @@ jobs: uses: actions/setup-dotnet@v1.7.2 with: dotnet-version: ${{ env.DotnetVersion }} - - name: Replace global.json in src/GWallet.Frontend.Maui - run: | - # Use global.json from root as it specifies .NET6 - cp ./global.json ./src/GWallet.Frontend.Maui/ - name: Install gtk workload run: | wget -O gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}.nupkg https://globalcdn.nuget.org/packages/gtksharp.net.sdk.gtk.manifest-${{ env.DotnetVersion }}.$GtkSharpVersion.nupkg @@ -667,11 +659,6 @@ jobs: run: | git submodule foreach git fetch --all && git submodule sync --recursive && git submodule update --init --recursive dotnet fsi ./scripts/snap_bump.fsx - - - name: Replace global.json in src/GWallet.Frontend.Maui - run: | - # Use global.json from root as it specifies .NET6 - cp ./global.json ./src/GWallet.Frontend.Maui/ - name: Generate snap package run: ./scripts/snap_build_maui.sh || (cat /home/runner/.local/state/snapcraft/log/*.log && exit 1) diff --git a/global.json b/global-net6.json similarity index 64% rename from global.json rename to global-net6.json index d8781bd10..2ff267cb3 100644 --- a/global.json +++ b/global-net6.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "6.0.113", + "version": "6.0.400", "rollForward": "latestMinor" } - } \ No newline at end of file +} diff --git a/src/GWallet.Frontend.Maui/global.json b/global-net8.json similarity index 97% rename from src/GWallet.Frontend.Maui/global.json rename to global-net8.json index 5b54541d5..b68597cd9 100644 --- a/src/GWallet.Frontend.Maui/global.json +++ b/global-net8.json @@ -3,4 +3,4 @@ "version": "8.0.0", "rollForward": "latestMinor" } -} \ No newline at end of file +} diff --git a/scripts/configure.fsx b/scripts/configure.fsx index 8a9c78159..7d565e9fc 100644 --- a/scripts/configure.fsx +++ b/scripts/configure.fsx @@ -202,7 +202,6 @@ let AddToDefinedConstants (constant: string) (configMap: Map) = configMap |> Map.add configKey (sprintf "%s;%s" previousConstants constant) - let configFileToBeWritten = let initialConfigFile = Map.empty.Add("Prefix", prefix.FullName) @@ -236,7 +235,7 @@ let lines = File.AppendAllLines(buildConfigFile.FullName, lines |> Array.ofSeq) -let version = Misc.GetCurrentVersion(rootDir) +//let version = Misc.GetCurrentVersion(rootDir) let repoInfo = Git.GetRepoInfo() @@ -246,11 +245,25 @@ let frontend = else "Xamarin.Forms" +if buildTool = Some "dotnet" then + let dotnetVesionString = + Process + .Execute({ Command = "dotnet"; Arguments = "--version" }, Echo.All) + .Unwrap("dotnet command failed") + let globalJsonFile = + if dotnetVesionString.StartsWith "6" then + "global-net6.json" + else + "global-net8.json" + Process + .Execute({ Command = "cp"; Arguments = sprintf "%s global.json" globalJsonFile }, Echo.All) + .Unwrap("Copy command failed") + |> ignore Console.WriteLine() -Console.WriteLine(sprintf - "\tConfiguration summary for geewallet %s %s" - (version.ToString()) repoInfo) +//Console.WriteLine(sprintf +// "\tConfiguration summary for geewallet %s %s" +// (version.ToString()) repoInfo) Console.WriteLine() Console.WriteLine(sprintf "\t* Installation prefix: %s"