Skip to content

Commit 4729a89

Browse files
RolfRolf
authored andcommitted
Fix release ZIP: use robocopy staging to preserve SuaviUI/ root folder
The old Compress-Archive -Path approach flattened the directory structure, placing all files at the top level instead of inside SuaviUI/. Switched to robocopy staging which preserves the folder hierarchy. Also added .claude, .busted, spec/, mocks/ to exclusion list.
1 parent 632b0c7 commit 4729a89

1 file changed

Lines changed: 23 additions & 18 deletions

File tree

docs/RELEASE_PROCESS.md

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ git push origin vX.X.X
4545
- `.DS_Store` - macOS metadata
4646
- `DS_Store` - macOS metadata (without dot)
4747
- `.previews/` - Screenshot previews
48+
- `.claude/` - Claude AI context files
49+
- `.busted` - Busted test runner config
50+
- `spec/` - Test specs
51+
- `mocks/` - Test mocks
4852

4953
**Files INCLUDED in ZIP:**
5054
- All Lua files (`utils/`, `imports/`, `libs/`, `skinning/`)
@@ -135,31 +139,32 @@ SuaviUI.zip
135139
## PowerShell Command Reference
136140

137141
### Create Release ZIP (Manual)
142+
143+
**IMPORTANT**: Do NOT use `Compress-Archive -Path $files.FullName` — it flattens the
144+
directory structure, losing the `SuaviUI/` root folder and duplicating files at the
145+
top level. Use robocopy staging instead:
146+
138147
```powershell
139148
cd "e:\Games\World of Warcraft\_retail_\Interface\AddOns"
140149
141150
# Remove old ZIP if exists
142151
if (Test-Path "SuaviUI-vX.X.X.zip") { Remove-Item "SuaviUI-vX.X.X.zip" }
143152
144-
# Define exclusions
145-
$exclude = @('docs', '.git', '.github', '.gitignore', '.pkgmeta', '.wowup_ignore',
146-
'.copilot-instructions.md', 'SuaviUI.code-workspace', 'error.log',
147-
'.DS_Store', 'DS_Store', '.previews')
148-
149-
# Get files excluding specified paths
150-
$files = Get-ChildItem -Path "SuaviUI" -Recurse | Where-Object {
151-
$skip = $false
152-
foreach ($ex in $exclude) {
153-
if ($_.FullName -like "*\$ex\*" -or $_.Name -eq $ex) {
154-
$skip = $true
155-
break
156-
}
157-
}
158-
-not $skip
159-
}
153+
# Stage a clean copy via robocopy (preserves folder structure)
154+
$staging = "$env:TEMP\SuaviUI-release"
155+
if (Test-Path $staging) { Remove-Item $staging -Recurse -Force }
156+
157+
# /E = recursive, /XD = exclude dirs, /XF = exclude files
158+
robocopy "SuaviUI" "$staging\SuaviUI" /E /NFL /NDL /NJH /NJS /NC /NS `
159+
/XD docs .git .github .previews .claude spec mocks `
160+
/XF .gitignore .pkgmeta .wowup_ignore .copilot-instructions.md `
161+
SuaviUI.code-workspace error.log .DS_Store DS_Store .busted
162+
163+
# Create ZIP from staging (SuaviUI/ is the root folder inside the archive)
164+
Compress-Archive -Path "$staging\SuaviUI" -DestinationPath "SuaviUI-vX.X.X.zip" -Force
160165
161-
# Create ZIP
162-
Compress-Archive -Path $files.FullName -DestinationPath "SuaviUI-vX.X.X.zip" -Force
166+
# Cleanup staging
167+
Remove-Item $staging -Recurse -Force
163168
164169
# Verify
165170
if (Test-Path "SuaviUI-vX.X.X.zip") {

0 commit comments

Comments
 (0)