Skip to content

Commit 1dd0ca4

Browse files
authored
Auto update (#27)
* add submodul * update deps * update deps * integrate moddingtoolbase code * implement and test argument parser * update namespace * move option parsing from boostrap to app code * update deps * update subs * update sub * update deps * add settings build exception handling * add json schema for baseline * fix tests * update subs * start feature: searching for local baselines * update deps * update sub * minor simplifications * update module * test on .net framework too * simplify * reenable update check and added default baseline * update sub * print used baseline file * make marker static * fix test * some cli improvements * update sub * update module * update logging * update * update deps * update sub * start update impl * horizontal frame supports native console * update sub * update sub * update sub * git pull * update dependencies * update logging * update modules * update logging * update module * update ci to .net 10 * fix test * mograte to new solution file * update module * fix ci * deploy to server * update config * new publish * try fix deploy * fix launch of uploader * update module * udpate version * update dependencies * logging again * logigng * logging der 5.
1 parent bc75fa4 commit 1dd0ca4

91 files changed

Lines changed: 4474 additions & 851 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/release.yml

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ on:
1313

1414
env:
1515
TOOL_PROJ_PATH: ./src/ModVerify.CliApp/ModVerify.CliApp.csproj
16-
CREATOR_PROJ_PATH: ./Modules/ModdingToolBase/src/AnakinApps/ApplicationManifestCreator/ApplicationManifestCreator.csproj
17-
UPLOADER_PROJ_PATH: ./Modules/ModdingToolBase/src/AnakinApps/FtpUploader/FtpUploader.csproj
16+
CREATOR_PROJ_PATH: ./modules/ModdingToolBase/src/AnakinApps/ApplicationManifestCreator/ApplicationManifestCreator.csproj
17+
UPLOADER_PROJ_PATH: ./modules/ModdingToolBase/src/AnakinApps/FtpUploader/FtpUploader.csproj
1818
TOOL_EXE: ModVerify.exe
1919
UPDATER_EXE: AnakinRaW.ExternalUpdater.exe
2020
MANIFEST_CREATOR: AnakinRaW.ApplicationManifestCreator.dll
@@ -35,18 +35,20 @@ jobs:
3535
runs-on: windows-latest
3636
steps:
3737
- name: Checkout sources
38-
uses: actions/checkout@v5
38+
uses: actions/checkout@v6
3939
with:
4040
fetch-depth: 0
4141
submodules: recursive
4242
- name: Setup .NET
43-
uses: actions/setup-dotnet@v4
43+
uses: actions/setup-dotnet@v5
4444
- name: Create NetFramework Release
45-
run: dotnet publish ${{ env.TOOL_PROJ_PATH }} --configuration Release -f net48 --output ./releases/net48 /p:DebugType=None /p:DebugSymbols=false
45+
# use build for .NET Framework to enusre external updatere .EXE is included
46+
run: dotnet build ${{ env.TOOL_PROJ_PATH }} --configuration Release -f net481 --output ./releases/net481 /p:DebugType=None /p:DebugSymbols=false
4647
- name: Create Net Core Release
47-
run: dotnet publish ${{ env.TOOL_PROJ_PATH }} --configuration Release -f net9.0 --output ./releases/net9.0 /p:DebugType=None /p:DebugSymbols=false
48+
# use publish for .NET Core
49+
run: dotnet publish ${{ env.TOOL_PROJ_PATH }} --configuration Release -f net10.0 --output ./releases/net10.0 /p:DebugType=None /p:DebugSymbols=false
4850
- name: Upload a Build Artifact
49-
uses: actions/upload-artifact@v4
51+
uses: actions/upload-artifact@v5
5052
with:
5153
name: Binary Releases
5254
path: ./releases
@@ -62,17 +64,45 @@ jobs:
6264
runs-on: ubuntu-latest
6365
steps:
6466
- name: Checkout sources
65-
uses: actions/checkout@v5
67+
uses: actions/checkout@v6
6668
with:
6769
fetch-depth: 0
68-
- uses: actions/download-artifact@v5
70+
submodules: recursive
71+
- uses: actions/download-artifact@v6
6972
with:
7073
name: Binary Releases
7174
path: ./releases
75+
76+
# Deploy .NET Framework self-update release
77+
- name: Setup .NET
78+
uses: actions/setup-dotnet@v5
79+
with:
80+
dotnet-version: 10.0.x
81+
- name: Build Creator
82+
run: dotnet build ${{env.CREATOR_PROJ_PATH}} --configuration Release --output ./dev
83+
- name: Build Uploader
84+
run: dotnet build ${{env.UPLOADER_PROJ_PATH}} --configuration Release --output ./dev
85+
- name: Create binaries directory
86+
run: mkdir -p ./deploy
87+
- name: Copy self-update files
88+
run: |
89+
cp ./releases/net481/${{env.TOOL_EXE}} ./deploy/
90+
cp ./releases/net481/${{env.UPDATER_EXE}} ./deploy/
91+
- name: Create Manifest
92+
run: dotnet ./dev/${{env.MANIFEST_CREATOR}} -a deploy/${{env.TOOL_EXE}} --appDataFiles deploy/${{env.UPDATER_EXE}} --origin ${{env.ORIGIN_BASE}} -o ./deploy -b ${{env.BRANCH_NAME}}
93+
- name: Upload Build
94+
run: dotnet ./dev/${{env.SFTP_UPLOADER}} ftp --host $host --port $port -u ${{secrets.SFTP_USER}} -p ${{secrets.SFTP_PASSWORD}} --base $base_path -s $source
95+
env:
96+
host: republicatwar.com
97+
port: 1579
98+
base_path: ${{env.ORIGIN_BASE_PART}}
99+
source: ./deploy
100+
101+
# Deploy .NET Core and .NET Framework apps to Github
72102
- name: Create NET Core .zip
73103
# Change into the artifacts directory to avoid including the directory itself in the zip archive
74-
working-directory: ./releases/net9.0
75-
run: zip -r ../ModVerify-Net9.zip .
104+
working-directory: ./releases/net10.0
105+
run: zip -r ../ModVerify-Net10.zip .
76106
- uses: dotnet/nbgv@v0.4.2
77107
id: nbgv
78108
- name: Create GitHub release
@@ -86,5 +116,5 @@ jobs:
86116
token: ${{ secrets.GITHUB_TOKEN }}
87117
generate_release_notes: true
88118
files: |
89-
./releases/net48/ModVerify.exe
90-
./releases/ModVerify-Net9.zip
119+
./releases/net481/ModVerify.exe
120+
./releases/ModVerify-Net10.zip

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919

2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v5
22+
uses: actions/checkout@v6
2323
with:
2424
fetch-depth: 0
2525
submodules: recursive
2626
- uses: actions/setup-dotnet@v4
2727
with:
28-
dotnet-version: 9.0.x
28+
dotnet-version: 10.0.x
2929
- name: Build & Test in Release Mode
3030
run: dotnet test --configuration Release

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "modules/ModdingToolBase"]
2+
path = modules/ModdingToolBase
3+
url = https://github.com/AnakinRaW/ModdingToolBase

Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
</PropertyGroup>
2525

2626
<PropertyGroup>
27-
<LangVersion>latest</LangVersion>
27+
<LangVersion>preview</LangVersion>
2828
<ImplicitUsings>disable</ImplicitUsings>
2929
<Nullable>enable</Nullable>
3030
<EnableNETAnalyzers>True</EnableNETAnalyzers>
@@ -39,7 +39,7 @@
3939
</PackageReference>
4040
<PackageReference Include="Nerdbank.GitVersioning" Condition="!Exists('packages.config')">
4141
<PrivateAssets>all</PrivateAssets>
42-
<Version>3.7.115</Version>
42+
<Version>3.9.50</Version>
4343
</PackageReference>
4444
<None Include="$(MSBuildThisFileDirectory)README.md" Pack="true" PackagePath="" />
4545
</ItemGroup>

ModVerify.sln

Lines changed: 0 additions & 63 deletions
This file was deleted.

ModVerify.slnx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<Solution>
2+
<Folder Name="/ModdingToolBase/" />
3+
<Folder Name="/ModdingToolBase/AnakinApps/">
4+
<Project Path="modules/ModdingToolBase/src/AnakinApps/ApplicationBase.CommandLine/ApplicationBase.CommandLine.csproj" />
5+
<Project Path="modules/ModdingToolBase/src/AnakinApps/ApplicationBase.Shared/ApplicationBase.Shared.shproj" />
6+
<Project Path="modules/ModdingToolBase/src/AnakinApps/ApplicationBase/ApplicationBase.csproj" />
7+
</Folder>
8+
<Folder Name="/ModdingToolBase/DeployTools/">
9+
<Project Path="modules/ModdingToolBase/src/AnakinApps/ApplicationManifestCreator/ApplicationManifestCreator.csproj" />
10+
<Project Path="modules/ModdingToolBase/src/AnakinApps/FtpUploader/FtpUploader.csproj" />
11+
</Folder>
12+
<Folder Name="/ModdingToolBase/UpdateFrameworks/">
13+
<Project Path="modules/ModdingToolBase/src/Updater/AppUpdaterFramework.Attributes/AppUpdaterFramework.Attributes.csproj" />
14+
<Project Path="modules/ModdingToolBase/src/Updater/AppUpdaterFramework.Manifest/AppUpdaterFramework.Manifest.csproj" />
15+
<Project Path="modules/ModdingToolBase/src/Updater/AppUpdaterFramework/AppUpdaterFramework.csproj" />
16+
<Project Path="modules/ModdingToolBase/src/Updater/ExternalUpdater.App/ExternalUpdater.App.csproj" />
17+
<Project Path="modules/ModdingToolBase/src/Updater/ExternalUpdater.Core/ExternalUpdater.Core.csproj" />
18+
</Folder>
19+
<Folder Name="/PetroglyphTools/">
20+
<Project Path="src/PetroglyphTools/PG.StarWarsGame.Engine/PG.StarWarsGame.Engine.csproj" />
21+
<Project Path="src/PetroglyphTools/PG.StarWarsGame.Files.ALO/PG.StarWarsGame.Files.ALO.csproj" />
22+
<Project Path="src/PetroglyphTools/PG.StarWarsGame.Files.ChunkFiles/PG.StarWarsGame.Files.ChunkFiles.csproj" />
23+
<Project Path="src/PetroglyphTools/PG.StarWarsGame.Files.XML/PG.StarWarsGame.Files.XML.csproj" />
24+
</Folder>
25+
<Project Path="src/ModVerify.CliApp/ModVerify.CliApp.csproj" />
26+
<Project Path="src/ModVerify/ModVerify.csproj" />
27+
<Project Path="test/ModVerify.CliApp.Test/ModVerify.CliApp.Test.csproj" />
28+
</Solution>

modules/ModdingToolBase

Submodule ModdingToolBase added at 479a088

src/ModVerify.CliApp/ConsoleUtilities.cs

Lines changed: 0 additions & 94 deletions
This file was deleted.

src/ModVerify.CliApp/ExtensionMethods.cs

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using PG.StarWarsGame.Infrastructure.Games;
22

3-
namespace AET.ModVerifyTool.GameFinder;
3+
namespace AET.ModVerify.App.GameFinder;
44

55
internal record GameFinderResult(IGame Game, IGame? FallbackGame);

0 commit comments

Comments
 (0)