mirror of
https://github.com/mRemoteNG/mRemoteNG.git
synced 2026-02-17 14:07:46 +08:00
add check for appveyor only actions in scripts
This commit is contained in:
@@ -2,13 +2,13 @@ $githubUrl = 'https://api.github.com'
|
||||
# GitHub doesn't support the default powershell protocol (TLS 1.0)
|
||||
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||
|
||||
|
||||
Install-Module -Name PowerShellForGitHub
|
||||
Set-GitHubConfiguration -DisableTelemetry
|
||||
$PSDefaultParameterValues["*-GitHub*:AccessToken"] = "$env:ACCESS_TOKEN"
|
||||
#$CURRENT_GITHUB_USER = $(Get-GitHubUser -Current).UserName
|
||||
$CURRENT_GITHUB_USER = $env:APPVEYOR_REPO_NAME.Split("/")[0]
|
||||
|
||||
#$ConfigurationName = $ConfigurationName.Trim()
|
||||
if (![string]::IsNullOrEmpty($env:APPVEYOR_REPO_NAME)) {
|
||||
$CURRENT_GITHUB_USER = $env:APPVEYOR_REPO_NAME.Split("/")[0]
|
||||
Install-Module -Name PowerShellForGitHub -Scope CurrentUser
|
||||
Set-GitHubConfiguration -DisableTelemetry
|
||||
$PSDefaultParameterValues["*-GitHub*:AccessToken"] = "$env:ACCESS_TOKEN"
|
||||
}
|
||||
|
||||
Function ConvertFrom-Base64($base64) {
|
||||
return [System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($base64))
|
||||
|
||||
@@ -46,8 +46,11 @@ Format-Table -AutoSize -Wrap -InputObject @{
|
||||
|
||||
& "$PSScriptRoot\rename_and_copy_installer.ps1" -SolutionDir $SolutionDir -BuildConfiguration $ConfigurationName.Trim()
|
||||
|
||||
& "$PSScriptRoot\create_upg_chk_files.ps1" -WebsiteTargetOwner $CURRENT_GITHUB_USER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
if (![string]::IsNullOrEmpty($CURRENT_GITHUB_USER)) {
|
||||
|
||||
& "$PSScriptRoot\update_and_upload_website_release_json_file.ps1" -WebsiteTargetOwner $CURRENT_GITHUB_USER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
& "$PSScriptRoot\create_upg_chk_files.ps1" -WebsiteTargetOwner $CURRENT_GITHUB_USER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
|
||||
& "$PSScriptRoot\update_and_upload_website_release_json_file.ps1" -WebsiteTargetOwner $CURRENT_GITHUB_USER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
}
|
||||
|
||||
Write-Output "End mRemoteNG Installer Post Build"
|
||||
|
||||
@@ -67,8 +67,12 @@ Format-Table -AutoSize -Wrap -InputObject @{
|
||||
|
||||
& "$PSScriptRoot\zip_files.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir -ConfigurationName $ConfigurationName
|
||||
|
||||
& "$PSScriptRoot\create_upg_chk_files.ps1" -WebsiteTargetOwner $CURRENT_GITHUB_USER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
if (![string]::IsNullOrEmpty($CURRENT_GITHUB_USER)) {
|
||||
|
||||
& "$PSScriptRoot\update_and_upload_website_release_json_file.ps1" -WebsiteTargetOwner $CURRENT_GITHUB_USER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
& "$PSScriptRoot\create_upg_chk_files.ps1" -WebsiteTargetOwner $CURRENT_GITHUB_USER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
|
||||
& "$PSScriptRoot\update_and_upload_website_release_json_file.ps1" -WebsiteTargetOwner $CURRENT_GITHUB_USER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME
|
||||
|
||||
}
|
||||
|
||||
Write-Output "End mRemoteNG Post Build"
|
||||
|
||||
Reference in New Issue
Block a user