docs: hide local publishing workflow

This commit is contained in:
2026-08-06 22:13:27 -04:00
parent 31fec9335c
commit fa3c4078b6
3 changed files with 0 additions and 102 deletions

View File

@@ -13,13 +13,3 @@ https://git.bep.moe/verniy/xiv-plugins/raw/branch/main/pluginmaster.json
## Plugins
- [Auto Fishing Stool](AutoFishingStool/README.md): automatically uses `/sit` after entering fishing mode.
## Publishing a Plugin
Increment the plugin version, then run this command from the repository root:
```powershell
.\scripts\publish-plugin.cmd -Project AutoFishingStool -Changelog "Describe the update"
```
Commit and push the updated source, `pluginmaster.json`, and release ZIP. Future plugin projects can use the same command with their project directory name.

View File

@@ -1,91 +0,0 @@
param(
[Parameter(Mandatory = $true)]
[string]$Project,
[string]$Changelog
)
$ErrorActionPreference = 'Stop'
$repositoryRoot = Split-Path -Parent $PSScriptRoot
$projectDirectory = Join-Path $repositoryRoot $Project
if (-not (Test-Path -LiteralPath $projectDirectory -PathType Container)) {
throw "Plugin project directory not found: $projectDirectory"
}
$projectFiles = @(Get-ChildItem -LiteralPath $projectDirectory -Filter '*.csproj' -File)
if ($projectFiles.Count -ne 1) {
throw "Expected exactly one project file in $projectDirectory"
}
$projectFile = $projectFiles[0]
$internalName = [System.IO.Path]::GetFileNameWithoutExtension($projectFile.Name)
dotnet build $projectFile.FullName -c Release --no-restore
if ($LASTEXITCODE -ne 0) {
throw "Release build failed for $internalName"
}
$packageDirectory = Join-Path $projectDirectory "bin\Release\$internalName"
$manifestPath = Join-Path $packageDirectory "$internalName.json"
$zipPath = Join-Path $packageDirectory 'latest.zip'
if (-not (Test-Path -LiteralPath $manifestPath -PathType Leaf)) {
throw "Release manifest not found: $manifestPath"
}
if (-not (Test-Path -LiteralPath $zipPath -PathType Leaf)) {
throw "Release package not found: $zipPath"
}
$manifest = Get-Content -LiteralPath $manifestPath -Raw | ConvertFrom-Json
$repositoryBaseUrl = 'https://git.bep.moe/verniy/xiv-plugins'
$downloadUrl = "$repositoryBaseUrl/raw/branch/main/repo/$internalName/latest.zip"
$destinationDirectory = Join-Path $repositoryRoot "repo\$internalName"
$pluginMasterPath = Join-Path $repositoryRoot 'pluginmaster.json'
New-Item -ItemType Directory -Path $destinationDirectory -Force | Out-Null
Copy-Item -LiteralPath $zipPath -Destination (Join-Path $destinationDirectory 'latest.zip') -Force
$entry = [ordered]@{
Author = $manifest.Author
Name = $manifest.Name
InternalName = $manifest.InternalName
AssemblyVersion = $manifest.AssemblyVersion
TestingAssemblyVersion = $null
Description = $manifest.Description
Punchline = $manifest.Punchline
RepoUrl = $manifest.RepoUrl
ApplicableVersion = $manifest.ApplicableVersion
DalamudApiLevel = $manifest.DalamudApiLevel
IsHide = $false
IsTestingExclusive = $false
DownloadLinkInstall = $downloadUrl
DownloadLinkUpdate = $downloadUrl
LastUpdate = [DateTimeOffset]::UtcNow.ToUnixTimeSeconds().ToString()
IconUrl = $manifest.IconUrl
Tags = @($manifest.Tags)
}
if ($Changelog) {
$entry.Changelog = $Changelog
} elseif ($manifest.Changelog) {
$entry.Changelog = $manifest.Changelog
}
$entries = @()
if (Test-Path -LiteralPath $pluginMasterPath -PathType Leaf) {
$existing = Get-Content -LiteralPath $pluginMasterPath -Raw | ConvertFrom-Json
$entries = @($existing | Where-Object { $_.InternalName -ne $internalName })
}
$entries += [PSCustomObject]$entry
$sortedEntries = @($entries | Sort-Object InternalName)
$json = ConvertTo-Json -InputObject $sortedEntries -Depth 10
$utf8 = [System.Text.UTF8Encoding]::new($false)
[System.IO.File]::WriteAllText($pluginMasterPath, $json + [Environment]::NewLine, $utf8)
Write-Output "Published $internalName $($manifest.AssemblyVersion)"
Write-Output "Repository index: $pluginMasterPath"
Write-Output "Package: $(Join-Path $destinationDirectory 'latest.zip')"

View File

@@ -1 +0,0 @@
@powershell.exe -NoProfile -ExecutionPolicy Bypass -File "%~dp0Publish-Plugin.ps1" %*