From d8eb04dc180b1653fb03fbb0e36f2c47bbeb5348 Mon Sep 17 00:00:00 2001 From: Pig Fang Date: Thu, 1 Aug 2019 14:40:27 +0800 Subject: [PATCH] Update release script --- scripts/release.ps1 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/release.ps1 b/scripts/release.ps1 index d54e9167..f9121cf3 100644 --- a/scripts/release.ps1 +++ b/scripts/release.ps1 @@ -3,23 +3,23 @@ $last = $manifest.latest $current = (Get-Content package.json | ConvertFrom-Json).version if ($last -eq $current) { - Write-Host "Latest version is $last. No need to publish." -ForegroundColor Green -BackgroundColor DarkMagenta + Write-Output "Latest version is $last. No need to publish." -ForegroundColor Green -BackgroundColor DarkMagenta exit } Install-Module PSGitHub -Force -Write-Host "'PSGitHub' has been installed." -ForegroundColor Green +Write-Output "'PSGitHub' has been installed." -ForegroundColor Green # Install dependencies composer install --no-dev Remove-Item vendor/bin -Recurse -Force yarn yarn build -Write-Host "Dependencies have been installed." -ForegroundColor Green +Write-Output "Dependencies have been installed." -ForegroundColor Green $zip = "blessing-skin-server-$current.zip" zip -9 -r $zip app bootstrap config database plugins public resources/lang resources/views resources/misc routes storage vendor .env.example artisan LICENSE README.md README_EN.md -Write-Host "Zip archive is created." -ForegroundColor Green +Write-Output "Zip archive is created." -ForegroundColor Green New-Item dist -ItemType Directory Set-Location dist @@ -28,7 +28,7 @@ Copy-Item -Path "../$zip" -Destination $zip $manifest.latest = $current $manifest.url = $manifest.url.Replace($last, $current) ConvertTo-Json $manifest | Out-File -FilePath update_2.json -Write-Host "Update source is prepared." -ForegroundColor Green +Write-Output "Update source is prepared." -ForegroundColor Green $azureToken = $env:AZURE_TOKEN git config --global user.email 'g-plane@hotmail.com' @@ -37,7 +37,7 @@ git init git add . git commit -m "Publish" git push -f "https://anything:$azureToken@dev.azure.com/blessing-skin/Blessing%20Skin%20Server/_git/Blessing%20Skin%20Server" master -Write-Host "Update source is pushed to Azure Repos." -ForegroundColor Green +Write-Output "Update source is pushed to Azure Repos." -ForegroundColor Green $githubToken = $env:GITHUB_TOKEN | ConvertTo-SecureString -AsPlainText -Force $enChangelog = Get-Content "../resources/misc/changelogs/en/$current.md" @@ -48,4 +48,4 @@ try { } catch { # Do nothing. } -Write-Host "New version $current is published!" -ForegroundColor Green -BackgroundColor DarkMagenta +Write-Output "New version $current is published!" -ForegroundColor Green -BackgroundColor DarkMagenta