andre482_O-tie/deploy.ps1
Andre482 5ac0a990c3 Audit: remove personal deploy paths and clarify plugin purpose in README.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-12 15:06:33 +03:00

27 lines
930 B
PowerShell

# Deploy O-Tie to a local Obsidian vault (developer use only).
# Set OBSIDIAN_VAULT_PATH to your vault root, or pass -VaultPath.
param(
[string]$VaultPath = $env:OBSIDIAN_VAULT_PATH
)
if (-not $VaultPath) {
Write-Error "Set OBSIDIAN_VAULT_PATH or pass -VaultPath to your Obsidian vault root."
exit 1
}
$pluginDir = Join-Path $VaultPath ".obsidian\plugins\o-tie"
$sourceDir = $PSScriptRoot
Write-Host "Building plugin..."
Push-Location $sourceDir
npm run build
if ($LASTEXITCODE -ne 0) { Pop-Location; exit 1 }
Pop-Location
Write-Host "Deploying to $pluginDir ..."
New-Item -ItemType Directory -Force -Path $pluginDir | Out-Null
Copy-Item (Join-Path $sourceDir "main.js") -Destination $pluginDir -Force
Copy-Item (Join-Path $sourceDir "manifest.json") -Destination $pluginDir -Force
Copy-Item (Join-Path $sourceDir "styles.css") -Destination $pluginDir -Force
Write-Host "Done. Reload Obsidian (Ctrl+R) to activate O-Tie."