Skip to content

Commit 2b981de

Browse files
committed
Fix release packaging layout
1 parent b6e548f commit 2b981de

3 files changed

Lines changed: 14 additions & 3 deletions

File tree

scripts/package-mod.cmd

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ set "STAGE_ROOT=%REPO_ROOT%\mod"
1010
set "MOD_ROOT=%STAGE_ROOT%\%MOD_NAME%"
1111
set "DIST_ROOT=%REPO_ROOT%\dist"
1212
set "ZIP_PATH=%DIST_ROOT%\%MOD_NAME%.zip"
13+
set "PACKAGE_ROOT=%DIST_ROOT%\package"
14+
set "PACKAGE_MOD_ROOT=%PACKAGE_ROOT%\%MOD_NAME%"
1315

1416
if not exist "%PROJECT_DIR%kc-accessibility.csproj" (
1517
echo Project file not found under "%PROJECT_DIR%"
@@ -21,9 +23,18 @@ if errorlevel 1 exit /b 1
2123

2224
if not exist "%DIST_ROOT%" mkdir "%DIST_ROOT%"
2325
if exist "%ZIP_PATH%" del /F /Q "%ZIP_PATH%"
26+
if exist "%PACKAGE_ROOT%" rmdir /S /Q "%PACKAGE_ROOT%"
27+
mkdir "%PACKAGE_MOD_ROOT%"
28+
if errorlevel 1 exit /b 1
29+
30+
for %%F in ("%MOD_ROOT%\*") do (
31+
if /I not "%%~aF"=="d" copy /Y "%%~fF" "%PACKAGE_MOD_ROOT%\%%~nxF" >nul
32+
)
2433

25-
powershell -NoProfile -ExecutionPolicy Bypass -Command "Compress-Archive -Path '%MOD_ROOT%\*' -DestinationPath '%ZIP_PATH%' -Force"
34+
powershell -NoProfile -ExecutionPolicy Bypass -Command "Push-Location '%PACKAGE_ROOT%'; Compress-Archive -Path '%MOD_NAME%' -DestinationPath '%ZIP_PATH%' -Force; Pop-Location"
2635
if errorlevel 1 exit /b 1
2736

37+
rmdir /S /Q "%PACKAGE_ROOT%"
38+
2839
echo Packaged mod zip at "%ZIP_PATH%"
2940
exit /b 0

src/kc-accessibility/ScreenReaderLoadMod.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
public class ScreenReaderLoadMod
44
{
55
private const string InitialAnnouncement = "Kingdoms and Castles loaded.";
6-
private const string BuildStamp = "0.2.2-dev6";
6+
private const string BuildStamp = "0.2.2";
77

88
private static KCModHelper helper;
99

src/kc-accessibility/info.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"Name": "kc-accessibility",
33
"Author": "chris",
44
"Description": "Adds screen-reader accessibility support for menus and gameplay.",
5-
"ModVersion": "0.2.1"
5+
"ModVersion": "0.2.2"
66
}

0 commit comments

Comments
 (0)