Files
sm-emby-share/scripts/release-tag.ps1
T

26 lines
586 B
PowerShell
Raw Normal View History

2026-07-14 11:11:36 +08:00
param(
[Parameter(Mandatory = $true)]
[ValidateSet('pc', 'windows', 'android', 'both')]
[string]$Platform,
[switch]$DryRun,
[switch]$NoPush,
[string]$Remote = 'origin'
)
$ErrorActionPreference = 'Stop'
$projectRoot = Split-Path -Parent $PSScriptRoot
$arguments = @(
(Join-Path $PSScriptRoot 'version.dart'),
'tag',
$Platform,
'--project-root',
$projectRoot,
'--remote',
$Remote
)
if ($DryRun) { $arguments += '--dry-run' }
if ($NoPush) { $arguments += '--no-push' }
& dart @arguments
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }