From 58448f73dbafd64f70388621588dba6c718606fd Mon Sep 17 00:00:00 2001 From: Meiam <91270@qq.com> Date: Thu, 11 Jun 2026 11:17:13 +0800 Subject: [PATCH] release: v1.0.14.0 --- .../Emby.MeiamSub.Shooter.csproj | 8 +- .../Emby.MeiamSub.Thunder.csproj | 8 +- .../Jellyfin.MeiamSub.Shooter.csproj | 8 +- Jellyfin.MeiamSub.Shooter/meta.json | 4 +- .../Jellyfin.MeiamSub.Thunder.csproj | 4 +- Jellyfin.MeiamSub.Thunder/meta.json | 4 +- publish.ps1 | 139 ++++++++++++++++++ 7 files changed, 157 insertions(+), 18 deletions(-) create mode 100644 publish.ps1 diff --git a/Emby.MeiamSub.Shooter/Emby.MeiamSub.Shooter.csproj b/Emby.MeiamSub.Shooter/Emby.MeiamSub.Shooter.csproj index 0d56c2d..2a577c7 100644 --- a/Emby.MeiamSub.Shooter/Emby.MeiamSub.Shooter.csproj +++ b/Emby.MeiamSub.Shooter/Emby.MeiamSub.Shooter.csproj @@ -1,9 +1,9 @@ - + - 1.0.13.0 - 1.0.13.0 - 1.0.13.0 + 1.0.14.0 + 1.0.14.0 + 1.0.14.0 diff --git a/Emby.MeiamSub.Thunder/Emby.MeiamSub.Thunder.csproj b/Emby.MeiamSub.Thunder/Emby.MeiamSub.Thunder.csproj index 6df758f..984de0f 100644 --- a/Emby.MeiamSub.Thunder/Emby.MeiamSub.Thunder.csproj +++ b/Emby.MeiamSub.Thunder/Emby.MeiamSub.Thunder.csproj @@ -1,9 +1,9 @@ - + - 1.0.13.0 - 1.0.13.0 - 1.0.13.0 + 1.0.14.0 + 1.0.14.0 + 1.0.14.0 diff --git a/Jellyfin.MeiamSub.Shooter/Jellyfin.MeiamSub.Shooter.csproj b/Jellyfin.MeiamSub.Shooter/Jellyfin.MeiamSub.Shooter.csproj index 4bdf17a..c2cbef9 100644 --- a/Jellyfin.MeiamSub.Shooter/Jellyfin.MeiamSub.Shooter.csproj +++ b/Jellyfin.MeiamSub.Shooter/Jellyfin.MeiamSub.Shooter.csproj @@ -1,10 +1,10 @@ - + net9.0 - 1.0.13.0 - 1.0.13.0 - 1.0.13.0 + 1.0.14.0 + 1.0.14.0 + 1.0.14.0 diff --git a/Jellyfin.MeiamSub.Shooter/meta.json b/Jellyfin.MeiamSub.Shooter/meta.json index 8e7698e..bcc8d64 100644 --- a/Jellyfin.MeiamSub.Shooter/meta.json +++ b/Jellyfin.MeiamSub.Shooter/meta.json @@ -5,8 +5,8 @@ "name": "MeiamSub.Shooter", "owner": "Meiam", "targetAbi": "10.11.0.0", - "timestamp": "2025-12-22T10:00:00.0000000Z", - "version": "1.0.13.0", + "timestamp": "2026-06-11T03:17:06.0000000Z", + "version": "1.0.14.0", "status": "Active", "imagePath": "thumb.png" } diff --git a/Jellyfin.MeiamSub.Thunder/Jellyfin.MeiamSub.Thunder.csproj b/Jellyfin.MeiamSub.Thunder/Jellyfin.MeiamSub.Thunder.csproj index 9155c34..8698de6 100644 --- a/Jellyfin.MeiamSub.Thunder/Jellyfin.MeiamSub.Thunder.csproj +++ b/Jellyfin.MeiamSub.Thunder/Jellyfin.MeiamSub.Thunder.csproj @@ -3,8 +3,8 @@ Library net9.0 - 1.0.13.0 - 1.0.13.0 + 1.0.14.0 + 1.0.14.0 diff --git a/Jellyfin.MeiamSub.Thunder/meta.json b/Jellyfin.MeiamSub.Thunder/meta.json index ee0d575..13e3fa1 100644 --- a/Jellyfin.MeiamSub.Thunder/meta.json +++ b/Jellyfin.MeiamSub.Thunder/meta.json @@ -5,8 +5,8 @@ "name": "MeiamSub.Thunder", "owner": "Meiam", "targetAbi": "10.11.0.0", - "timestamp": "2025-12-22T10:00:00.0000000Z", - "version": "1.0.13.0", + "timestamp": "2026-06-11T03:17:06.0000000Z", + "version": "1.0.14.0", "status": "Active", "imagePath": "thumb.png" } diff --git a/publish.ps1 b/publish.ps1 new file mode 100644 index 0000000..abe9260 --- /dev/null +++ b/publish.ps1 @@ -0,0 +1,139 @@ +param ( + [Parameter(Mandatory=$true)] + [string]$Version, + + [Parameter(Mandatory=$false)] + [string]$JellyfinVersion, + + [Parameter(Mandatory=$false)] + [string]$EmbyVersion, + + [Parameter(Mandatory=$false)] + [switch]$PublishToGitHub +) + +$ErrorActionPreference = "Stop" + +Write-Host "=== Start Release Process, Target Version: $Version ===" -ForegroundColor Cyan + +# 1. Get current UTC timestamp +$Timestamp = [DateTime]::UtcNow.ToString("yyyy-MM-ddTHH:mm:ss.0000000Z") +Write-Host "Current package timestamp (UTC): $Timestamp" -ForegroundColor Gray + +# Define paths +$ThunderCsproj = "Jellyfin.MeiamSub.Thunder\Jellyfin.MeiamSub.Thunder.csproj" +$ThunderMeta = "Jellyfin.MeiamSub.Thunder\meta.json" +$ShooterCsproj = "Jellyfin.MeiamSub.Shooter\Jellyfin.MeiamSub.Shooter.csproj" +$ShooterMeta = "Jellyfin.MeiamSub.Shooter\meta.json" +$EmbyThunderCsproj = "Emby.MeiamSub.Thunder\Emby.MeiamSub.Thunder.csproj" +$EmbyShooterCsproj = "Emby.MeiamSub.Shooter\Emby.MeiamSub.Shooter.csproj" + +# Update NuGet package version if specified +if ($JellyfinVersion) { + Write-Host "Upgrading Jellyfin.Controller NuGet dependency to $JellyfinVersion..." -ForegroundColor Yellow + (Get-Content $ThunderCsproj) -replace '', "" | Set-Content $ThunderCsproj + (Get-Content $ShooterCsproj) -replace '', "" | Set-Content $ShooterCsproj +} + +if ($EmbyVersion) { + Write-Host "Upgrading MediaBrowser NuGet dependencies to $EmbyVersion..." -ForegroundColor Yellow + (Get-Content $EmbyThunderCsproj) -replace '', "" ` + -replace '', "" | Set-Content $EmbyThunderCsproj + (Get-Content $EmbyShooterCsproj) -replace '', "" ` + -replace '', "" | Set-Content $EmbyShooterCsproj +} + +Write-Host "Updating version and timestamp in project files..." -ForegroundColor Yellow + +# Update Jellyfin Thunder +(Get-Content $ThunderCsproj) -replace '[\d\.]+', "$Version" ` + -replace '[\d\.]+', "$Version" | Set-Content $ThunderCsproj + +(Get-Content $ThunderMeta) -replace '"version":\s*"[\d\.]+"', "`"version`": `"$Version`"" ` + -replace '"timestamp":\s*"[^"]+"', "`"timestamp`": `"$Timestamp`"" | Set-Content $ThunderMeta + +# Update Jellyfin Shooter +(Get-Content $ShooterCsproj) -replace '[\d\.]+', "$Version" ` + -replace '[\d\.]+', "$Version" ` + -replace '[\d\.]+', "$Version" | Set-Content $ShooterCsproj + +(Get-Content $ShooterMeta) -replace '"version":\s*"[\d\.]+"', "`"version`": `"$Version`"" ` + -replace '"timestamp":\s*"[^"]+"', "`"timestamp`": `"$Timestamp`"" | Set-Content $ShooterMeta + +# Update Emby Thunder +(Get-Content $EmbyThunderCsproj) -replace '[\d\.]+', "$Version" ` + -replace '[\d\.]+', "$Version" ` + -replace '[\d\.]+', "$Version" | Set-Content $EmbyThunderCsproj + +# Update Emby Shooter +(Get-Content $EmbyShooterCsproj) -replace '[\d\.]+', "$Version" ` + -replace '[\d\.]+', "$Version" ` + -replace '[\d\.]+', "$Version" | Set-Content $EmbyShooterCsproj + +Write-Host "Versions and timestamps updated successfully!" -ForegroundColor Green + +# 2. Compile solution +Write-Host "Compiling solution in Release mode..." -ForegroundColor Yellow +dotnet build MeiamSubtitles.sln -c Release + +# 3. Create zip archives +Write-Host "Packaging zip archives..." -ForegroundColor Yellow +$TempDir = "Release\temp_pack" +$EmbyPackDir = "$TempDir\Emby" +$JellyfinShooterPackDir = "$TempDir\Jellyfin\Jellyfin.MeiamSub.Shooter_$Version" +$JellyfinThunderPackDir = "$TempDir\Jellyfin\Jellyfin.MeiamSub.Thunder_$Version" + +# Clean temp directories +if (Test-Path $TempDir) { Remove-Item -Recurse -Force $TempDir } +New-Item -ItemType Directory -Force -Path $EmbyPackDir | Out-Null +New-Item -ItemType Directory -Force -Path $JellyfinShooterPackDir | Out-Null +New-Item -ItemType Directory -Force -Path $JellyfinThunderPackDir | Out-Null + +# Copy Emby DLLs +Copy-Item Release\Emby.MeiamSub.Shooter.dll $EmbyPackDir\ +Copy-Item Release\Emby.MeiamSub.Thunder.dll $EmbyPackDir\ + +# Copy Jellyfin Shooter artifacts +Copy-Item Release\Jellyfin.MeiamSub.Shooter.dll $JellyfinShooterPackDir\ +Copy-Item Jellyfin.MeiamSub.Shooter\meta.json $JellyfinShooterPackDir\ +Copy-Item Jellyfin.MeiamSub.Shooter\thumb.png $JellyfinShooterPackDir\ + +# Copy Jellyfin Thunder artifacts +Copy-Item Release\Jellyfin.MeiamSub.Thunder.dll $JellyfinThunderPackDir\ +Copy-Item Jellyfin.MeiamSub.Thunder\meta.json $JellyfinThunderPackDir\ +Copy-Item Jellyfin.MeiamSub.Thunder\thumb.png $JellyfinThunderPackDir\ + +# Archive target paths +$EmbyZip = "Release\Emby_v$Version.zip" +$JellyfinZip = "Release\Jellyfin_v$Version.zip" + +if (Test-Path $EmbyZip) { Remove-Item -Force $EmbyZip } +if (Test-Path $JellyfinZip) { Remove-Item -Force $JellyfinZip } + +# Compress +Compress-Archive -Path "$EmbyPackDir\*" -DestinationPath $EmbyZip -Force +Compress-Archive -Path "$TempDir\Jellyfin\*" -DestinationPath $JellyfinZip -Force + +# Cleanup temp +Remove-Item -Recurse -Force $TempDir + +Write-Host "=== Packaging Finished successfully! ===" -ForegroundColor Green +Write-Host "Emby Package: $EmbyZip" -ForegroundColor Gray +Write-Host "Jellyfin Package: $JellyfinZip" -ForegroundColor Gray + +# 4. Publish to GitHub Release if specified +if ($PublishToGitHub) { + Write-Host "=== Start GitHub Release process ===" -ForegroundColor Cyan + + Write-Host "Staging and committing release changes..." -ForegroundColor Yellow + git add . + git commit -m "release: v$Version" + + Write-Host "Pushing changes to remote repository..." -ForegroundColor Yellow + git push origin master + + Write-Host "Creating GitHub Release v$Version and uploading assets..." -ForegroundColor Yellow + gh release create "v$Version" $EmbyZip $JellyfinZip --title "v$Version" --generate-notes + + Write-Host "=== GitHub Release finished successfully! ===" -ForegroundColor Green +}