Release Hudra 0.10 beta 1
This commit is contained in:
+26
-24
@@ -47,21 +47,18 @@ Write-Host ""
|
||||
Write-Host "Building $ExtensionName $Version..." -ForegroundColor Cyan
|
||||
Write-Host ""
|
||||
|
||||
# Files and folders that should not be included in the extension ZIP
|
||||
$ExcludedItems = @(
|
||||
".git",
|
||||
".github",
|
||||
".gitea",
|
||||
".vscode",
|
||||
"docs",
|
||||
"release",
|
||||
"node_modules",
|
||||
".gitignore",
|
||||
"README.md",
|
||||
"ROADMAP.md",
|
||||
"CONTRIBUTING.md",
|
||||
"LICENSE",
|
||||
"release.ps1"
|
||||
# Only files required by the browser extension at runtime belong in the ZIP.
|
||||
# Everything else is excluded by default, including release output, previous
|
||||
# releases, scripts, repository metadata, documentation and development files.
|
||||
$IncludedItems = @(
|
||||
"manifest.json",
|
||||
"background.js",
|
||||
"page-detection.js",
|
||||
"presenter.js",
|
||||
"controls.html",
|
||||
"controls.css",
|
||||
"controls.js",
|
||||
"icons"
|
||||
)
|
||||
|
||||
# Recreate the staging folder
|
||||
@@ -71,15 +68,20 @@ if (Test-Path $StagingFolder) {
|
||||
|
||||
New-Item -ItemType Directory -Path $StagingFolder -Force | Out-Null
|
||||
|
||||
# Copy extension files into the clean staging folder
|
||||
Get-ChildItem -Path $ProjectRoot -Force | ForEach-Object {
|
||||
if ($ExcludedItems -notcontains $_.Name) {
|
||||
Copy-Item `
|
||||
-Path $_.FullName `
|
||||
-Destination $StagingFolder `
|
||||
-Recurse `
|
||||
-Force
|
||||
# Copy only the allowlisted runtime files into the clean staging folder
|
||||
$IncludedItems | ForEach-Object {
|
||||
$SourcePath = Join-Path $ProjectRoot $_
|
||||
|
||||
if (-not (Test-Path $SourcePath)) {
|
||||
Write-Host "ERROR: Required runtime item was not found: $_" -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
Copy-Item `
|
||||
-Path $SourcePath `
|
||||
-Destination $StagingFolder `
|
||||
-Recurse `
|
||||
-Force
|
||||
}
|
||||
|
||||
# Confirm that the copied release contains manifest.json
|
||||
@@ -121,4 +123,4 @@ Write-Host " $ZipPath" -ForegroundColor Yellow
|
||||
Write-Host ""
|
||||
Write-Host "ZIP size: $ZipSize KB"
|
||||
Write-Host ""
|
||||
Write-Host "Ready for Gitea and the Chrome Web Store." -ForegroundColor Green
|
||||
Write-Host "Ready for Gitea and the Chrome Web Store." -ForegroundColor Green
|
||||
|
||||
Reference in New Issue
Block a user