Add reminder management improvements
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$root = Split-Path -Parent $PSScriptRoot
|
||||
$manifestPath = Join-Path $root "manifest.json"
|
||||
$manifest = Get-Content -Raw -LiteralPath $manifestPath | ConvertFrom-Json
|
||||
$releaseDir = Join-Path $root "dist"
|
||||
$stagingDir = Join-Path $releaseDir "reminder-notifier"
|
||||
$zipPath = Join-Path $releaseDir ("reminder-notifier-" + $manifest.version + ".zip")
|
||||
|
||||
if (Test-Path -LiteralPath $stagingDir) {
|
||||
Remove-Item -LiteralPath $stagingDir -Recurse -Force
|
||||
}
|
||||
|
||||
New-Item -ItemType Directory -Path $stagingDir | Out-Null
|
||||
Copy-Item -LiteralPath (Join-Path $root "manifest.json") -Destination $stagingDir
|
||||
Copy-Item -LiteralPath (Join-Path $root "main.js") -Destination $stagingDir
|
||||
Copy-Item -LiteralPath (Join-Path $root "styles.css") -Destination $stagingDir
|
||||
|
||||
if (Test-Path -LiteralPath $zipPath) {
|
||||
Remove-Item -LiteralPath $zipPath -Force
|
||||
}
|
||||
|
||||
Compress-Archive -Path (Join-Path $stagingDir "*") -DestinationPath $zipPath
|
||||
Write-Host "Release archive created: $zipPath"
|
||||
|
||||
Reference in New Issue
Block a user