From d8cdbfec7f4d9c927ad2aaabac3bde5be1d0331e Mon Sep 17 00:00:00 2001 From: Kaioru Date: Sun, 18 Aug 2024 18:29:43 +0800 Subject: [PATCH] Add NUKE build system --- .github/workflows/build.yml | 35 ++++ Edelstein.sln | 342 ++++++++++++++++---------------- build.cmd | 7 + build.ps1 | 74 +++++++ build.sh | 67 +++++++ build/.editorconfig | 11 + build/Build.cs | 36 ++++ build/Configuration.cs | 14 ++ build/Directory.Build.props | 8 + build/Directory.Build.targets | 8 + build/_build.csproj | 18 ++ build/_build.csproj.DotSettings | 28 +++ 12 files changed, 479 insertions(+), 169 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100755 build.cmd create mode 100644 build.ps1 create mode 100755 build.sh create mode 100644 build/.editorconfig create mode 100644 build/Build.cs create mode 100644 build/Configuration.cs create mode 100644 build/Directory.Build.props create mode 100644 build/Directory.Build.targets create mode 100644 build/_build.csproj create mode 100644 build/_build.csproj.DotSettings diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..feafc1f4c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,35 @@ +# ------------------------------------------------------------------------------ +# +# +# This code was generated. +# +# - To turn off auto-generation set: +# +# [GitHubActions (AutoGenerate = false)] +# +# - To trigger manual generation invoke: +# +# nuke --generate-configuration GitHubActions_build --host GitHubActions +# +# +# ------------------------------------------------------------------------------ + +name: build + +on: [push] + +jobs: + ubuntu-latest: + name: ubuntu-latest + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: 'Cache: .nuke/temp, ~/.nuget/packages' + uses: actions/cache@v3 + with: + path: | + .nuke/temp + ~/.nuget/packages + key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }} + - name: 'Run: Compile' + run: ./build.cmd Compile diff --git a/Edelstein.sln b/Edelstein.sln index c3df71132..f0d452a57 100644 --- a/Edelstein.sln +++ b/Edelstein.sln @@ -1,169 +1,173 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0C8602E7-AED6-43A4-BA0F-165EAB963D07}" - ProjectSection(SolutionItems) = preProject - src\Directory.Build.props = src\Directory.Build.props - src\Directory.Packages.props = src\Directory.Packages.props - src\Directory.Build.targets = src\Directory.Build.targets - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "app", "app", "{FED60761-FD6B-4EBD-B896-FAFB2D991E13}" - ProjectSection(SolutionItems) = preProject - src\app\Directory.Build.props = src\app\Directory.Build.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{E50DFCDF-39D5-4D0D-A46E-94D11D795087}" - ProjectSection(SolutionItems) = preProject - src\common\Directory.Build.props = src\common\Directory.Build.props - EndProjectSection -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "protocol", "protocol", "{82D7864B-19AD-484C-BD2E-897F05B5852C}" - ProjectSection(SolutionItems) = preProject - src\protocol\Directory.Build.props = src\protocol\Directory.Build.props - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Protocol.Network", "src\protocol\Edelstein.Protocol.Network\Edelstein.Protocol.Network.csproj", "{AF5AC908-62BB-48CE-99E8-83388738CCB1}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Network.DotNetty", "src\common\Edelstein.Common.Network.DotNetty\Edelstein.Common.Network.DotNetty.csproj", "{0ED46D09-2617-4FBE-BFB4-D8B49BCE5C01}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Crypto", "src\common\Edelstein.Common.Crypto\Edelstein.Common.Crypto.csproj", "{875EE192-E044-4C8D-941F-86C24C3FABF7}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Protocol.Gameplay", "src\protocol\Edelstein.Protocol.Gameplay\Edelstein.Protocol.Gameplay.csproj", "{6EE946AC-42B7-4581-A12D-00BD57504225}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Protocol.Gameplay.Login", "src\protocol\Edelstein.Protocol.Gameplay.Login\Edelstein.Protocol.Gameplay.Login.csproj", "{0C635DAF-1DF9-4DC1-9691-37B9F681C779}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Protocol.Utilities", "src\protocol\Edelstein.Protocol.Utilities\Edelstein.Protocol.Utilities.csproj", "{87090115-87E8-4BD0-9BDF-699E839A2FBD}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Gameplay", "src\common\Edelstein.Common.Gameplay\Edelstein.Common.Gameplay.csproj", "{04BF61F6-3840-4AD7-9ECA-1CE47FE14143}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Utilities", "src\common\Edelstein.Common.Utilities\Edelstein.Common.Utilities.csproj", "{CBA29483-F98D-467D-8FA3-DD980CEA982C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Gameplay.Login", "src\common\Edelstein.Common.Gameplay.Login\Edelstein.Common.Gameplay.Login.csproj", "{A8962D72-0FE4-4678-BFF6-FBD165E79103}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Protocol.Plugin", "src\protocol\Edelstein.Protocol.Plugin\Edelstein.Protocol.Plugin.csproj", "{0F5A1AE4-D6CA-4325-9F17-1ACC58048A04}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Plugin", "src\common\Edelstein.Common.Plugin\Edelstein.Common.Plugin.csproj", "{917FCEED-4FA0-4C55-A66A-5E5B4FB6F220}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Protocol.Plugin.Login", "src\protocol\Edelstein.Protocol.Plugin.Login\Edelstein.Protocol.Plugin.Login.csproj", "{C70A28BF-4EFD-4EB7-94BA-DF59BA415B71}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Application.Server", "src\app\Edelstein.Application.Server\Edelstein.Application.Server.csproj", "{982EAFDE-0785-4542-BB6C-0716DFC6B0DA}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugin", "plugin", "{E037F392-38D9-43ED-86EA-740EB51A475B}" - ProjectSection(SolutionItems) = preProject - src\plugin\Directory.Build.targets = src\plugin\Directory.Build.targets - src\plugin\Directory.Build.props = src\plugin\Directory.Build.props - EndProjectSection -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Plugin.Rue", "src\plugin\Edelstein.Plugin.Rue\Edelstein.Plugin.Rue.csproj", "{AAFAAEFF-090E-4AE5-B278-BD33F8BEA841}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Database", "src\common\Edelstein.Common.Database\Edelstein.Common.Database.csproj", "{84FE3DCF-9CFB-4B29-9532-924FE42F86EA}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Database.Sqlite", "src\common\Edelstein.Common.Database.Sqlite\Edelstein.Common.Database.Sqlite.csproj", "{198F92CE-3D7C-4524-9536-17A8B91CDC74}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Database.Pgsql", "src\common\Edelstein.Common.Database.Pgsql\Edelstein.Common.Database.Pgsql.csproj", "{45285DB8-5443-486B-B761-9B4713A9A5D0}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(NestedProjects) = preSolution - {FED60761-FD6B-4EBD-B896-FAFB2D991E13} = {0C8602E7-AED6-43A4-BA0F-165EAB963D07} - {E50DFCDF-39D5-4D0D-A46E-94D11D795087} = {0C8602E7-AED6-43A4-BA0F-165EAB963D07} - {82D7864B-19AD-484C-BD2E-897F05B5852C} = {0C8602E7-AED6-43A4-BA0F-165EAB963D07} - {AF5AC908-62BB-48CE-99E8-83388738CCB1} = {82D7864B-19AD-484C-BD2E-897F05B5852C} - {0ED46D09-2617-4FBE-BFB4-D8B49BCE5C01} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} - {875EE192-E044-4C8D-941F-86C24C3FABF7} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} - {6EE946AC-42B7-4581-A12D-00BD57504225} = {82D7864B-19AD-484C-BD2E-897F05B5852C} - {0C635DAF-1DF9-4DC1-9691-37B9F681C779} = {82D7864B-19AD-484C-BD2E-897F05B5852C} - {87090115-87E8-4BD0-9BDF-699E839A2FBD} = {82D7864B-19AD-484C-BD2E-897F05B5852C} - {04BF61F6-3840-4AD7-9ECA-1CE47FE14143} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} - {CBA29483-F98D-467D-8FA3-DD980CEA982C} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} - {A8962D72-0FE4-4678-BFF6-FBD165E79103} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} - {0F5A1AE4-D6CA-4325-9F17-1ACC58048A04} = {82D7864B-19AD-484C-BD2E-897F05B5852C} - {917FCEED-4FA0-4C55-A66A-5E5B4FB6F220} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} - {C70A28BF-4EFD-4EB7-94BA-DF59BA415B71} = {82D7864B-19AD-484C-BD2E-897F05B5852C} - {982EAFDE-0785-4542-BB6C-0716DFC6B0DA} = {FED60761-FD6B-4EBD-B896-FAFB2D991E13} - {E037F392-38D9-43ED-86EA-740EB51A475B} = {0C8602E7-AED6-43A4-BA0F-165EAB963D07} - {AAFAAEFF-090E-4AE5-B278-BD33F8BEA841} = {E037F392-38D9-43ED-86EA-740EB51A475B} - {84FE3DCF-9CFB-4B29-9532-924FE42F86EA} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} - {198F92CE-3D7C-4524-9536-17A8B91CDC74} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} - {45285DB8-5443-486B-B761-9B4713A9A5D0} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {AF5AC908-62BB-48CE-99E8-83388738CCB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AF5AC908-62BB-48CE-99E8-83388738CCB1}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AF5AC908-62BB-48CE-99E8-83388738CCB1}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AF5AC908-62BB-48CE-99E8-83388738CCB1}.Release|Any CPU.Build.0 = Release|Any CPU - {0ED46D09-2617-4FBE-BFB4-D8B49BCE5C01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0ED46D09-2617-4FBE-BFB4-D8B49BCE5C01}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0ED46D09-2617-4FBE-BFB4-D8B49BCE5C01}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0ED46D09-2617-4FBE-BFB4-D8B49BCE5C01}.Release|Any CPU.Build.0 = Release|Any CPU - {875EE192-E044-4C8D-941F-86C24C3FABF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {875EE192-E044-4C8D-941F-86C24C3FABF7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {875EE192-E044-4C8D-941F-86C24C3FABF7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {875EE192-E044-4C8D-941F-86C24C3FABF7}.Release|Any CPU.Build.0 = Release|Any CPU - {6EE946AC-42B7-4581-A12D-00BD57504225}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {6EE946AC-42B7-4581-A12D-00BD57504225}.Debug|Any CPU.Build.0 = Debug|Any CPU - {6EE946AC-42B7-4581-A12D-00BD57504225}.Release|Any CPU.ActiveCfg = Release|Any CPU - {6EE946AC-42B7-4581-A12D-00BD57504225}.Release|Any CPU.Build.0 = Release|Any CPU - {0C635DAF-1DF9-4DC1-9691-37B9F681C779}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0C635DAF-1DF9-4DC1-9691-37B9F681C779}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0C635DAF-1DF9-4DC1-9691-37B9F681C779}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0C635DAF-1DF9-4DC1-9691-37B9F681C779}.Release|Any CPU.Build.0 = Release|Any CPU - {87090115-87E8-4BD0-9BDF-699E839A2FBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {87090115-87E8-4BD0-9BDF-699E839A2FBD}.Debug|Any CPU.Build.0 = Debug|Any CPU - {87090115-87E8-4BD0-9BDF-699E839A2FBD}.Release|Any CPU.ActiveCfg = Release|Any CPU - {87090115-87E8-4BD0-9BDF-699E839A2FBD}.Release|Any CPU.Build.0 = Release|Any CPU - {04BF61F6-3840-4AD7-9ECA-1CE47FE14143}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {04BF61F6-3840-4AD7-9ECA-1CE47FE14143}.Debug|Any CPU.Build.0 = Debug|Any CPU - {04BF61F6-3840-4AD7-9ECA-1CE47FE14143}.Release|Any CPU.ActiveCfg = Release|Any CPU - {04BF61F6-3840-4AD7-9ECA-1CE47FE14143}.Release|Any CPU.Build.0 = Release|Any CPU - {CBA29483-F98D-467D-8FA3-DD980CEA982C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CBA29483-F98D-467D-8FA3-DD980CEA982C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CBA29483-F98D-467D-8FA3-DD980CEA982C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CBA29483-F98D-467D-8FA3-DD980CEA982C}.Release|Any CPU.Build.0 = Release|Any CPU - {A8962D72-0FE4-4678-BFF6-FBD165E79103}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {A8962D72-0FE4-4678-BFF6-FBD165E79103}.Debug|Any CPU.Build.0 = Debug|Any CPU - {A8962D72-0FE4-4678-BFF6-FBD165E79103}.Release|Any CPU.ActiveCfg = Release|Any CPU - {A8962D72-0FE4-4678-BFF6-FBD165E79103}.Release|Any CPU.Build.0 = Release|Any CPU - {0F5A1AE4-D6CA-4325-9F17-1ACC58048A04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0F5A1AE4-D6CA-4325-9F17-1ACC58048A04}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0F5A1AE4-D6CA-4325-9F17-1ACC58048A04}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0F5A1AE4-D6CA-4325-9F17-1ACC58048A04}.Release|Any CPU.Build.0 = Release|Any CPU - {917FCEED-4FA0-4C55-A66A-5E5B4FB6F220}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {917FCEED-4FA0-4C55-A66A-5E5B4FB6F220}.Debug|Any CPU.Build.0 = Debug|Any CPU - {917FCEED-4FA0-4C55-A66A-5E5B4FB6F220}.Release|Any CPU.ActiveCfg = Release|Any CPU - {917FCEED-4FA0-4C55-A66A-5E5B4FB6F220}.Release|Any CPU.Build.0 = Release|Any CPU - {C70A28BF-4EFD-4EB7-94BA-DF59BA415B71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C70A28BF-4EFD-4EB7-94BA-DF59BA415B71}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C70A28BF-4EFD-4EB7-94BA-DF59BA415B71}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C70A28BF-4EFD-4EB7-94BA-DF59BA415B71}.Release|Any CPU.Build.0 = Release|Any CPU - {982EAFDE-0785-4542-BB6C-0716DFC6B0DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {982EAFDE-0785-4542-BB6C-0716DFC6B0DA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {982EAFDE-0785-4542-BB6C-0716DFC6B0DA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {982EAFDE-0785-4542-BB6C-0716DFC6B0DA}.Release|Any CPU.Build.0 = Release|Any CPU - {AAFAAEFF-090E-4AE5-B278-BD33F8BEA841}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {AAFAAEFF-090E-4AE5-B278-BD33F8BEA841}.Debug|Any CPU.Build.0 = Debug|Any CPU - {AAFAAEFF-090E-4AE5-B278-BD33F8BEA841}.Release|Any CPU.ActiveCfg = Release|Any CPU - {AAFAAEFF-090E-4AE5-B278-BD33F8BEA841}.Release|Any CPU.Build.0 = Release|Any CPU - {84FE3DCF-9CFB-4B29-9532-924FE42F86EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {84FE3DCF-9CFB-4B29-9532-924FE42F86EA}.Debug|Any CPU.Build.0 = Debug|Any CPU - {84FE3DCF-9CFB-4B29-9532-924FE42F86EA}.Release|Any CPU.ActiveCfg = Release|Any CPU - {84FE3DCF-9CFB-4B29-9532-924FE42F86EA}.Release|Any CPU.Build.0 = Release|Any CPU - {198F92CE-3D7C-4524-9536-17A8B91CDC74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {198F92CE-3D7C-4524-9536-17A8B91CDC74}.Debug|Any CPU.Build.0 = Debug|Any CPU - {198F92CE-3D7C-4524-9536-17A8B91CDC74}.Release|Any CPU.ActiveCfg = Release|Any CPU - {198F92CE-3D7C-4524-9536-17A8B91CDC74}.Release|Any CPU.Build.0 = Release|Any CPU - {45285DB8-5443-486B-B761-9B4713A9A5D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {45285DB8-5443-486B-B761-9B4713A9A5D0}.Debug|Any CPU.Build.0 = Debug|Any CPU - {45285DB8-5443-486B-B761-9B4713A9A5D0}.Release|Any CPU.ActiveCfg = Release|Any CPU - {45285DB8-5443-486B-B761-9B4713A9A5D0}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31903.59 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0C8602E7-AED6-43A4-BA0F-165EAB963D07}" + ProjectSection(SolutionItems) = preProject + src\Directory.Build.props = src\Directory.Build.props + src\Directory.Packages.props = src\Directory.Packages.props + src\Directory.Build.targets = src\Directory.Build.targets + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "app", "app", "{FED60761-FD6B-4EBD-B896-FAFB2D991E13}" + ProjectSection(SolutionItems) = preProject + src\app\Directory.Build.props = src\app\Directory.Build.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "common", "common", "{E50DFCDF-39D5-4D0D-A46E-94D11D795087}" + ProjectSection(SolutionItems) = preProject + src\common\Directory.Build.props = src\common\Directory.Build.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "protocol", "protocol", "{82D7864B-19AD-484C-BD2E-897F05B5852C}" + ProjectSection(SolutionItems) = preProject + src\protocol\Directory.Build.props = src\protocol\Directory.Build.props + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Protocol.Network", "src\protocol\Edelstein.Protocol.Network\Edelstein.Protocol.Network.csproj", "{AF5AC908-62BB-48CE-99E8-83388738CCB1}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Network.DotNetty", "src\common\Edelstein.Common.Network.DotNetty\Edelstein.Common.Network.DotNetty.csproj", "{0ED46D09-2617-4FBE-BFB4-D8B49BCE5C01}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Crypto", "src\common\Edelstein.Common.Crypto\Edelstein.Common.Crypto.csproj", "{875EE192-E044-4C8D-941F-86C24C3FABF7}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Protocol.Gameplay", "src\protocol\Edelstein.Protocol.Gameplay\Edelstein.Protocol.Gameplay.csproj", "{6EE946AC-42B7-4581-A12D-00BD57504225}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Protocol.Gameplay.Login", "src\protocol\Edelstein.Protocol.Gameplay.Login\Edelstein.Protocol.Gameplay.Login.csproj", "{0C635DAF-1DF9-4DC1-9691-37B9F681C779}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Protocol.Utilities", "src\protocol\Edelstein.Protocol.Utilities\Edelstein.Protocol.Utilities.csproj", "{87090115-87E8-4BD0-9BDF-699E839A2FBD}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Gameplay", "src\common\Edelstein.Common.Gameplay\Edelstein.Common.Gameplay.csproj", "{04BF61F6-3840-4AD7-9ECA-1CE47FE14143}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Utilities", "src\common\Edelstein.Common.Utilities\Edelstein.Common.Utilities.csproj", "{CBA29483-F98D-467D-8FA3-DD980CEA982C}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Gameplay.Login", "src\common\Edelstein.Common.Gameplay.Login\Edelstein.Common.Gameplay.Login.csproj", "{A8962D72-0FE4-4678-BFF6-FBD165E79103}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Protocol.Plugin", "src\protocol\Edelstein.Protocol.Plugin\Edelstein.Protocol.Plugin.csproj", "{0F5A1AE4-D6CA-4325-9F17-1ACC58048A04}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Plugin", "src\common\Edelstein.Common.Plugin\Edelstein.Common.Plugin.csproj", "{917FCEED-4FA0-4C55-A66A-5E5B4FB6F220}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Protocol.Plugin.Login", "src\protocol\Edelstein.Protocol.Plugin.Login\Edelstein.Protocol.Plugin.Login.csproj", "{C70A28BF-4EFD-4EB7-94BA-DF59BA415B71}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Application.Server", "src\app\Edelstein.Application.Server\Edelstein.Application.Server.csproj", "{982EAFDE-0785-4542-BB6C-0716DFC6B0DA}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "plugin", "plugin", "{E037F392-38D9-43ED-86EA-740EB51A475B}" + ProjectSection(SolutionItems) = preProject + src\plugin\Directory.Build.targets = src\plugin\Directory.Build.targets + src\plugin\Directory.Build.props = src\plugin\Directory.Build.props + EndProjectSection +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Plugin.Rue", "src\plugin\Edelstein.Plugin.Rue\Edelstein.Plugin.Rue.csproj", "{AAFAAEFF-090E-4AE5-B278-BD33F8BEA841}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Database", "src\common\Edelstein.Common.Database\Edelstein.Common.Database.csproj", "{84FE3DCF-9CFB-4B29-9532-924FE42F86EA}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Database.Sqlite", "src\common\Edelstein.Common.Database.Sqlite\Edelstein.Common.Database.Sqlite.csproj", "{198F92CE-3D7C-4524-9536-17A8B91CDC74}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Edelstein.Common.Database.Pgsql", "src\common\Edelstein.Common.Database.Pgsql\Edelstein.Common.Database.Pgsql.csproj", "{45285DB8-5443-486B-B761-9B4713A9A5D0}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{6527D18C-B0E2-49BA-B649-4D5DB6216069}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {FED60761-FD6B-4EBD-B896-FAFB2D991E13} = {0C8602E7-AED6-43A4-BA0F-165EAB963D07} + {E50DFCDF-39D5-4D0D-A46E-94D11D795087} = {0C8602E7-AED6-43A4-BA0F-165EAB963D07} + {82D7864B-19AD-484C-BD2E-897F05B5852C} = {0C8602E7-AED6-43A4-BA0F-165EAB963D07} + {AF5AC908-62BB-48CE-99E8-83388738CCB1} = {82D7864B-19AD-484C-BD2E-897F05B5852C} + {0ED46D09-2617-4FBE-BFB4-D8B49BCE5C01} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} + {875EE192-E044-4C8D-941F-86C24C3FABF7} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} + {6EE946AC-42B7-4581-A12D-00BD57504225} = {82D7864B-19AD-484C-BD2E-897F05B5852C} + {0C635DAF-1DF9-4DC1-9691-37B9F681C779} = {82D7864B-19AD-484C-BD2E-897F05B5852C} + {87090115-87E8-4BD0-9BDF-699E839A2FBD} = {82D7864B-19AD-484C-BD2E-897F05B5852C} + {04BF61F6-3840-4AD7-9ECA-1CE47FE14143} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} + {CBA29483-F98D-467D-8FA3-DD980CEA982C} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} + {A8962D72-0FE4-4678-BFF6-FBD165E79103} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} + {0F5A1AE4-D6CA-4325-9F17-1ACC58048A04} = {82D7864B-19AD-484C-BD2E-897F05B5852C} + {917FCEED-4FA0-4C55-A66A-5E5B4FB6F220} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} + {C70A28BF-4EFD-4EB7-94BA-DF59BA415B71} = {82D7864B-19AD-484C-BD2E-897F05B5852C} + {982EAFDE-0785-4542-BB6C-0716DFC6B0DA} = {FED60761-FD6B-4EBD-B896-FAFB2D991E13} + {E037F392-38D9-43ED-86EA-740EB51A475B} = {0C8602E7-AED6-43A4-BA0F-165EAB963D07} + {AAFAAEFF-090E-4AE5-B278-BD33F8BEA841} = {E037F392-38D9-43ED-86EA-740EB51A475B} + {84FE3DCF-9CFB-4B29-9532-924FE42F86EA} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} + {198F92CE-3D7C-4524-9536-17A8B91CDC74} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} + {45285DB8-5443-486B-B761-9B4713A9A5D0} = {E50DFCDF-39D5-4D0D-A46E-94D11D795087} + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6527D18C-B0E2-49BA-B649-4D5DB6216069}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6527D18C-B0E2-49BA-B649-4D5DB6216069}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF5AC908-62BB-48CE-99E8-83388738CCB1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AF5AC908-62BB-48CE-99E8-83388738CCB1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AF5AC908-62BB-48CE-99E8-83388738CCB1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AF5AC908-62BB-48CE-99E8-83388738CCB1}.Release|Any CPU.Build.0 = Release|Any CPU + {0ED46D09-2617-4FBE-BFB4-D8B49BCE5C01}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0ED46D09-2617-4FBE-BFB4-D8B49BCE5C01}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0ED46D09-2617-4FBE-BFB4-D8B49BCE5C01}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0ED46D09-2617-4FBE-BFB4-D8B49BCE5C01}.Release|Any CPU.Build.0 = Release|Any CPU + {875EE192-E044-4C8D-941F-86C24C3FABF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {875EE192-E044-4C8D-941F-86C24C3FABF7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {875EE192-E044-4C8D-941F-86C24C3FABF7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {875EE192-E044-4C8D-941F-86C24C3FABF7}.Release|Any CPU.Build.0 = Release|Any CPU + {6EE946AC-42B7-4581-A12D-00BD57504225}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6EE946AC-42B7-4581-A12D-00BD57504225}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6EE946AC-42B7-4581-A12D-00BD57504225}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6EE946AC-42B7-4581-A12D-00BD57504225}.Release|Any CPU.Build.0 = Release|Any CPU + {0C635DAF-1DF9-4DC1-9691-37B9F681C779}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0C635DAF-1DF9-4DC1-9691-37B9F681C779}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0C635DAF-1DF9-4DC1-9691-37B9F681C779}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0C635DAF-1DF9-4DC1-9691-37B9F681C779}.Release|Any CPU.Build.0 = Release|Any CPU + {87090115-87E8-4BD0-9BDF-699E839A2FBD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {87090115-87E8-4BD0-9BDF-699E839A2FBD}.Debug|Any CPU.Build.0 = Debug|Any CPU + {87090115-87E8-4BD0-9BDF-699E839A2FBD}.Release|Any CPU.ActiveCfg = Release|Any CPU + {87090115-87E8-4BD0-9BDF-699E839A2FBD}.Release|Any CPU.Build.0 = Release|Any CPU + {04BF61F6-3840-4AD7-9ECA-1CE47FE14143}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {04BF61F6-3840-4AD7-9ECA-1CE47FE14143}.Debug|Any CPU.Build.0 = Debug|Any CPU + {04BF61F6-3840-4AD7-9ECA-1CE47FE14143}.Release|Any CPU.ActiveCfg = Release|Any CPU + {04BF61F6-3840-4AD7-9ECA-1CE47FE14143}.Release|Any CPU.Build.0 = Release|Any CPU + {CBA29483-F98D-467D-8FA3-DD980CEA982C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {CBA29483-F98D-467D-8FA3-DD980CEA982C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {CBA29483-F98D-467D-8FA3-DD980CEA982C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {CBA29483-F98D-467D-8FA3-DD980CEA982C}.Release|Any CPU.Build.0 = Release|Any CPU + {A8962D72-0FE4-4678-BFF6-FBD165E79103}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {A8962D72-0FE4-4678-BFF6-FBD165E79103}.Debug|Any CPU.Build.0 = Debug|Any CPU + {A8962D72-0FE4-4678-BFF6-FBD165E79103}.Release|Any CPU.ActiveCfg = Release|Any CPU + {A8962D72-0FE4-4678-BFF6-FBD165E79103}.Release|Any CPU.Build.0 = Release|Any CPU + {0F5A1AE4-D6CA-4325-9F17-1ACC58048A04}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F5A1AE4-D6CA-4325-9F17-1ACC58048A04}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F5A1AE4-D6CA-4325-9F17-1ACC58048A04}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F5A1AE4-D6CA-4325-9F17-1ACC58048A04}.Release|Any CPU.Build.0 = Release|Any CPU + {917FCEED-4FA0-4C55-A66A-5E5B4FB6F220}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {917FCEED-4FA0-4C55-A66A-5E5B4FB6F220}.Debug|Any CPU.Build.0 = Debug|Any CPU + {917FCEED-4FA0-4C55-A66A-5E5B4FB6F220}.Release|Any CPU.ActiveCfg = Release|Any CPU + {917FCEED-4FA0-4C55-A66A-5E5B4FB6F220}.Release|Any CPU.Build.0 = Release|Any CPU + {C70A28BF-4EFD-4EB7-94BA-DF59BA415B71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C70A28BF-4EFD-4EB7-94BA-DF59BA415B71}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C70A28BF-4EFD-4EB7-94BA-DF59BA415B71}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C70A28BF-4EFD-4EB7-94BA-DF59BA415B71}.Release|Any CPU.Build.0 = Release|Any CPU + {982EAFDE-0785-4542-BB6C-0716DFC6B0DA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {982EAFDE-0785-4542-BB6C-0716DFC6B0DA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {982EAFDE-0785-4542-BB6C-0716DFC6B0DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {982EAFDE-0785-4542-BB6C-0716DFC6B0DA}.Release|Any CPU.Build.0 = Release|Any CPU + {AAFAAEFF-090E-4AE5-B278-BD33F8BEA841}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AAFAAEFF-090E-4AE5-B278-BD33F8BEA841}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AAFAAEFF-090E-4AE5-B278-BD33F8BEA841}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AAFAAEFF-090E-4AE5-B278-BD33F8BEA841}.Release|Any CPU.Build.0 = Release|Any CPU + {84FE3DCF-9CFB-4B29-9532-924FE42F86EA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {84FE3DCF-9CFB-4B29-9532-924FE42F86EA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {84FE3DCF-9CFB-4B29-9532-924FE42F86EA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {84FE3DCF-9CFB-4B29-9532-924FE42F86EA}.Release|Any CPU.Build.0 = Release|Any CPU + {198F92CE-3D7C-4524-9536-17A8B91CDC74}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {198F92CE-3D7C-4524-9536-17A8B91CDC74}.Debug|Any CPU.Build.0 = Debug|Any CPU + {198F92CE-3D7C-4524-9536-17A8B91CDC74}.Release|Any CPU.ActiveCfg = Release|Any CPU + {198F92CE-3D7C-4524-9536-17A8B91CDC74}.Release|Any CPU.Build.0 = Release|Any CPU + {45285DB8-5443-486B-B761-9B4713A9A5D0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {45285DB8-5443-486B-B761-9B4713A9A5D0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {45285DB8-5443-486B-B761-9B4713A9A5D0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {45285DB8-5443-486B-B761-9B4713A9A5D0}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection +EndGlobal diff --git a/build.cmd b/build.cmd new file mode 100755 index 000000000..b08cc590f --- /dev/null +++ b/build.cmd @@ -0,0 +1,7 @@ +:; set -eo pipefail +:; SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) +:; ${SCRIPT_DIR}/build.sh "$@" +:; exit $? + +@ECHO OFF +powershell -ExecutionPolicy ByPass -NoProfile -File "%~dp0build.ps1" %* diff --git a/build.ps1 b/build.ps1 new file mode 100644 index 000000000..381a7bec0 --- /dev/null +++ b/build.ps1 @@ -0,0 +1,74 @@ +[CmdletBinding()] +Param( + [Parameter(Position=0,Mandatory=$false,ValueFromRemainingArguments=$true)] + [string[]]$BuildArguments +) + +Write-Output "PowerShell $($PSVersionTable.PSEdition) version $($PSVersionTable.PSVersion)" + +Set-StrictMode -Version 2.0; $ErrorActionPreference = "Stop"; $ConfirmPreference = "None"; trap { Write-Error $_ -ErrorAction Continue; exit 1 } +$PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent + +########################################################################### +# CONFIGURATION +########################################################################### + +$BuildProjectFile = "$PSScriptRoot\build\_build.csproj" +$TempDirectory = "$PSScriptRoot\\.nuke\temp" + +$DotNetGlobalFile = "$PSScriptRoot\\global.json" +$DotNetInstallUrl = "https://dot.net/v1/dotnet-install.ps1" +$DotNetChannel = "STS" + +$env:DOTNET_CLI_TELEMETRY_OPTOUT = 1 +$env:DOTNET_NOLOGO = 1 + +########################################################################### +# EXECUTION +########################################################################### + +function ExecSafe([scriptblock] $cmd) { + & $cmd + if ($LASTEXITCODE) { exit $LASTEXITCODE } +} + +# If dotnet CLI is installed globally and it matches requested version, use for execution +if ($null -ne (Get-Command "dotnet" -ErrorAction SilentlyContinue) -and ` + $(dotnet --version) -and $LASTEXITCODE -eq 0) { + $env:DOTNET_EXE = (Get-Command "dotnet").Path +} +else { + # Download install script + $DotNetInstallFile = "$TempDirectory\dotnet-install.ps1" + New-Item -ItemType Directory -Path $TempDirectory -Force | Out-Null + [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + (New-Object System.Net.WebClient).DownloadFile($DotNetInstallUrl, $DotNetInstallFile) + + # If global.json exists, load expected version + if (Test-Path $DotNetGlobalFile) { + $DotNetGlobal = $(Get-Content $DotNetGlobalFile | Out-String | ConvertFrom-Json) + if ($DotNetGlobal.PSObject.Properties["sdk"] -and $DotNetGlobal.sdk.PSObject.Properties["version"]) { + $DotNetVersion = $DotNetGlobal.sdk.version + } + } + + # Install by channel or version + $DotNetDirectory = "$TempDirectory\dotnet-win" + if (!(Test-Path variable:DotNetVersion)) { + ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Channel $DotNetChannel -NoPath } + } else { + ExecSafe { & powershell $DotNetInstallFile -InstallDir $DotNetDirectory -Version $DotNetVersion -NoPath } + } + $env:DOTNET_EXE = "$DotNetDirectory\dotnet.exe" + $env:PATH = "$DotNetDirectory;$env:PATH" +} + +Write-Output "Microsoft (R) .NET SDK version $(& $env:DOTNET_EXE --version)" + +if (Test-Path env:NUKE_ENTERPRISE_TOKEN) { + & $env:DOTNET_EXE nuget remove source "nuke-enterprise" > $null + & $env:DOTNET_EXE nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password $env:NUKE_ENTERPRISE_TOKEN > $null +} + +ExecSafe { & $env:DOTNET_EXE build $BuildProjectFile /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet } +ExecSafe { & $env:DOTNET_EXE run --project $BuildProjectFile --no-build -- $BuildArguments } diff --git a/build.sh b/build.sh new file mode 100755 index 000000000..fdff0c623 --- /dev/null +++ b/build.sh @@ -0,0 +1,67 @@ +#!/usr/bin/env bash + +bash --version 2>&1 | head -n 1 + +set -eo pipefail +SCRIPT_DIR=$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd) + +########################################################################### +# CONFIGURATION +########################################################################### + +BUILD_PROJECT_FILE="$SCRIPT_DIR/build/_build.csproj" +TEMP_DIRECTORY="$SCRIPT_DIR//.nuke/temp" + +DOTNET_GLOBAL_FILE="$SCRIPT_DIR//global.json" +DOTNET_INSTALL_URL="https://dot.net/v1/dotnet-install.sh" +DOTNET_CHANNEL="STS" + +export DOTNET_CLI_TELEMETRY_OPTOUT=1 +export DOTNET_NOLOGO=1 + +########################################################################### +# EXECUTION +########################################################################### + +function FirstJsonValue { + perl -nle 'print $1 if m{"'"$1"'": "([^"]+)",?}' <<< "${@:2}" +} + +# If dotnet CLI is installed globally and it matches requested version, use for execution +if [ -x "$(command -v dotnet)" ] && dotnet --version &>/dev/null; then + export DOTNET_EXE="$(command -v dotnet)" +else + # Download install script + DOTNET_INSTALL_FILE="$TEMP_DIRECTORY/dotnet-install.sh" + mkdir -p "$TEMP_DIRECTORY" + curl -Lsfo "$DOTNET_INSTALL_FILE" "$DOTNET_INSTALL_URL" + chmod +x "$DOTNET_INSTALL_FILE" + + # If global.json exists, load expected version + if [[ -f "$DOTNET_GLOBAL_FILE" ]]; then + DOTNET_VERSION=$(FirstJsonValue "version" "$(cat "$DOTNET_GLOBAL_FILE")") + if [[ "$DOTNET_VERSION" == "" ]]; then + unset DOTNET_VERSION + fi + fi + + # Install by channel or version + DOTNET_DIRECTORY="$TEMP_DIRECTORY/dotnet-unix" + if [[ -z ${DOTNET_VERSION+x} ]]; then + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --channel "$DOTNET_CHANNEL" --no-path + else + "$DOTNET_INSTALL_FILE" --install-dir "$DOTNET_DIRECTORY" --version "$DOTNET_VERSION" --no-path + fi + export DOTNET_EXE="$DOTNET_DIRECTORY/dotnet" + export PATH="$DOTNET_DIRECTORY:$PATH" +fi + +echo "Microsoft (R) .NET SDK version $("$DOTNET_EXE" --version)" + +if [[ ! -z ${NUKE_ENTERPRISE_TOKEN+x} && "$NUKE_ENTERPRISE_TOKEN" != "" ]]; then + "$DOTNET_EXE" nuget remove source "nuke-enterprise" &>/dev/null || true + "$DOTNET_EXE" nuget add source "https://f.feedz.io/nuke/enterprise/nuget" --name "nuke-enterprise" --username "PAT" --password "$NUKE_ENTERPRISE_TOKEN" --store-password-in-clear-text &>/dev/null || true +fi + +"$DOTNET_EXE" build "$BUILD_PROJECT_FILE" /nodeReuse:false /p:UseSharedCompilation=false -nologo -clp:NoSummary --verbosity quiet +"$DOTNET_EXE" run --project "$BUILD_PROJECT_FILE" --no-build -- "$@" diff --git a/build/.editorconfig b/build/.editorconfig new file mode 100644 index 000000000..31e43dcd8 --- /dev/null +++ b/build/.editorconfig @@ -0,0 +1,11 @@ +[*.cs] +dotnet_style_qualification_for_field = false:warning +dotnet_style_qualification_for_property = false:warning +dotnet_style_qualification_for_method = false:warning +dotnet_style_qualification_for_event = false:warning +dotnet_style_require_accessibility_modifiers = never:warning + +csharp_style_expression_bodied_methods = true:silent +csharp_style_expression_bodied_properties = true:warning +csharp_style_expression_bodied_indexers = true:warning +csharp_style_expression_bodied_accessors = true:warning diff --git a/build/Build.cs b/build/Build.cs new file mode 100644 index 000000000..de7ca2ddf --- /dev/null +++ b/build/Build.cs @@ -0,0 +1,36 @@ +using Nuke.Common; +using Nuke.Common.CI.GitHubActions; +using Nuke.Common.Tools.DotNet; + +[GitHubActions( + "build", + GitHubActionsImage.UbuntuLatest, + On = new[] { GitHubActionsTrigger.Push }, + InvokedTargets = new[] { nameof(Compile) } +)] +partial class Build : NukeBuild +{ + /// Support plugins are available for: + /// - JetBrains ReSharper https://nuke.build/resharper + /// - JetBrains Rider https://nuke.build/rider + /// - Microsoft VisualStudio https://nuke.build/visualstudio + /// - Microsoft VSCode https://nuke.build/vscode + + public static int Main () => Execute(x => x.Compile); + + [Parameter("Configuration to build - Default is 'Debug' (local) or 'Release' (server)")] + readonly Configuration Configuration = IsLocalBuild ? Configuration.Debug : Configuration.Release; + + Target Clean => d => d + .Before(Restore) + .Executes(() => DotNetTasks.DotNetClean()); + + Target Restore => d => d + .Executes(() => DotNetTasks.DotNetRestore()); + + Target Compile => d => d + .DependsOn(Restore) + .Executes(() => DotNetTasks + .DotNetBuild(s => s + .SetConfiguration(Configuration))); +} diff --git a/build/Configuration.cs b/build/Configuration.cs new file mode 100644 index 000000000..9b22a3bd9 --- /dev/null +++ b/build/Configuration.cs @@ -0,0 +1,14 @@ +using System.ComponentModel; +using Nuke.Common.Tooling; + +[TypeConverter(typeof(TypeConverter))] +public class Configuration : Enumeration +{ + public static Configuration Debug = new Configuration { Value = nameof(Debug) }; + public static Configuration Release = new Configuration { Value = nameof(Release) }; + + public static implicit operator string(Configuration configuration) + { + return configuration.Value; + } +} diff --git a/build/Directory.Build.props b/build/Directory.Build.props new file mode 100644 index 000000000..e147d6352 --- /dev/null +++ b/build/Directory.Build.props @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/build/Directory.Build.targets b/build/Directory.Build.targets new file mode 100644 index 000000000..253260956 --- /dev/null +++ b/build/Directory.Build.targets @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/build/_build.csproj b/build/_build.csproj new file mode 100644 index 000000000..b1965fae1 --- /dev/null +++ b/build/_build.csproj @@ -0,0 +1,18 @@ + + + + Exe + net8.0 + + CS0649;CS0169;CA1050;CA1822;CA2211;IDE1006 + .. + .. + 1 + false + + + + + + + diff --git a/build/_build.csproj.DotSettings b/build/_build.csproj.DotSettings new file mode 100644 index 000000000..eb3f4c27c --- /dev/null +++ b/build/_build.csproj.DotSettings @@ -0,0 +1,28 @@ + + DO_NOT_SHOW + DO_NOT_SHOW + DO_NOT_SHOW + DO_NOT_SHOW + DO_NOT_SHOW + Implicit + Implicit + ExpressionBody + 0 + NEXT_LINE + True + False + 120 + IF_OWNER_IS_SINGLE_LINE + WRAP_IF_LONG + False + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + <Policy Inspect="True" Prefix="" Suffix="" Style="AaBb" /> + True + True + True + True + True + True + True + True + True