docs: add yunjia project overview README
This commit is contained in:
34
release.ps1
Normal file
34
release.ps1
Normal file
@@ -0,0 +1,34 @@
|
||||
[CmdletBinding()]
|
||||
param(
|
||||
[string]$Prefix = "v",
|
||||
[string]$Message = "正式发布",
|
||||
[switch]$AutoCommit,
|
||||
[switch]$RequireClean,
|
||||
[string]$CommitMessage,
|
||||
[switch]$DryRun
|
||||
)
|
||||
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$candidates = @(
|
||||
(Join-Path $scriptDir "..\jiangchang-platform-kit\tools\release.ps1"),
|
||||
(Join-Path $scriptDir "..\..\jiangchang-platform-kit\tools\release.ps1")
|
||||
)
|
||||
$sharedScript = $null
|
||||
foreach ($c in $candidates) {
|
||||
$resolved = [System.IO.Path]::GetFullPath($c)
|
||||
if (Test-Path $resolved) {
|
||||
$sharedScript = $resolved
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if ($null -ne $sharedScript) {
|
||||
& $sharedScript @PSBoundParameters
|
||||
exit $LASTEXITCODE
|
||||
}
|
||||
|
||||
Write-Host "Release failed: jiangchang-platform-kit/tools/release.ps1 not found." -ForegroundColor Red
|
||||
exit 1
|
||||
Reference in New Issue
Block a user