diff --git a/Tools/create_upg_chk_files.ps1 b/Tools/create_upg_chk_files.ps1 index 257b664fb..f063b5899 100644 --- a/Tools/create_upg_chk_files.ps1 +++ b/Tools/create_upg_chk_files.ps1 @@ -118,7 +118,7 @@ if ($env:APPVEYOR_PROJECT_NAME -match "(Nightly)") { $buildFolder = Join-Path -Path $PSScriptRoot -ChildPath "..\mRemoteNG\bin\x64\Release" -Resolve -ErrorAction Ignore -if ($UpdateChannel -ne "" -and $buildFolder -ne "" -and $WebsiteTargetOwner -and $WebsiteTargetRepository) { +if ($UpdateChannel -ne "" -and $buildFolder -ne "" -and $WebsiteTargetOwner -ne "" -and $WebsiteTargetRepository -ne "" ) { $releaseFolder = Join-Path -Path $PSScriptRoot -ChildPath "..\Release" -Resolve $msiFile = Get-ChildItem -Path "$buildFolder\*.msi" | Sort-Object LastWriteTime | Select-Object -last 1 diff --git a/Tools/postbuild_installer.ps1 b/Tools/postbuild_installer.ps1 index 79c6dff09..656de53ce 100644 --- a/Tools/postbuild_installer.ps1 +++ b/Tools/postbuild_installer.ps1 @@ -46,11 +46,11 @@ Format-Table -AutoSize -Wrap -InputObject @{ & "$PSScriptRoot\rename_and_copy_installer.ps1" -SolutionDir $SolutionDir -BuildConfiguration $ConfigurationName.Trim() -if ( ![string]::IsNullOrEmpty($env:WEBSITE_TARGET_OWNER) -and ![string]::IsNullOrEmpty($env:WEBSITE_TARGET_REPOSITORY) ) { +if ( ![string]::IsNullOrEmpty($env:MAIN_REPOSITORY) -and ![string]::IsNullOrEmpty($env:WEBSITE_TARGET_OWNER) -and ![string]::IsNullOrEmpty($env:WEBSITE_TARGET_REPOSITORY) ) { & "$PSScriptRoot\create_upg_chk_files.ps1" -WebsiteTargetOwner $env:WEBSITE_TARGET_OWNER -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 $env:WEBSITE_TARGET_OWNER -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" -MainRepository $env:MAIN_REPOSITORY -WebsiteTargetOwner $env:WEBSITE_TARGET_OWNER -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" diff --git a/Tools/postbuild_mremoteng.ps1 b/Tools/postbuild_mremoteng.ps1 index 87f62e461..2e479f7ed 100644 --- a/Tools/postbuild_mremoteng.ps1 +++ b/Tools/postbuild_mremoteng.ps1 @@ -67,11 +67,11 @@ Format-Table -AutoSize -Wrap -InputObject @{ & "$PSScriptRoot\zip_files.ps1" -SolutionDir $SolutionDir -TargetDir $TargetDir -ConfigurationName $ConfigurationName -if ( ![string]::IsNullOrEmpty($env:WEBSITE_TARGET_OWNER) -and ![string]::IsNullOrEmpty($env:WEBSITE_TARGET_REPOSITORY) ) { +if ( ![string]::IsNullOrEmpty($env:MAIN_REPOSITORY) -and ![string]::IsNullOrEmpty($env:WEBSITE_TARGET_OWNER) -and ![string]::IsNullOrEmpty($env:WEBSITE_TARGET_REPOSITORY) ) { & "$PSScriptRoot\create_upg_chk_files.ps1" -WebsiteTargetOwner $env:WEBSITE_TARGET_OWNER -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 $env:WEBSITE_TARGET_OWNER -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" -MainRepository $env:MAIN_REPOSITORY -WebsiteTargetOwner $env:WEBSITE_TARGET_OWNER -WebsiteTargetRepository $env:WEBSITE_TARGET_REPOSITORY -PreTagName $env:NightlyBuildTagName -TagName $env:APPVEYOR_BUILD_VERSION -ProjectName $env:APPVEYOR_PROJECT_NAME } diff --git a/Tools/update_and_upload_website_release_json_file.ps1 b/Tools/update_and_upload_website_release_json_file.ps1 index 194aca76d..e6237bfa9 100644 --- a/Tools/update_and_upload_website_release_json_file.ps1 +++ b/Tools/update_and_upload_website_release_json_file.ps1 @@ -1,5 +1,9 @@ #Requires -Version 4.0 param ( + [string] + [Parameter(Mandatory=$true)] + $MainRepository, + [string] [Parameter(Mandatory=$true)] $WebsiteTargetOwner, @@ -44,7 +48,7 @@ if ($env:APPVEYOR_PROJECT_NAME -match "(Nightly)") { $buildFolder = Join-Path -Path $PSScriptRoot -ChildPath "..\mRemoteNG\bin\x64\Release" -Resolve -ErrorAction Ignore -if ($UpdateChannel -ne "" -and $buildFolder -ne "" -and $WebsiteTargetOwner -and $WebsiteTargetRepository) { +if ($UpdateChannel -ne "" -and $buildFolder -ne "" -and $MainRepository -ne "" -and $WebsiteTargetOwner -ne "" -and $WebsiteTargetRepository -ne "" ) { $releaseFolder = Join-Path -Path $PSScriptRoot -ChildPath "..\Release" -Resolve $published_at = (Get-Date).ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ") @@ -65,8 +69,8 @@ if ($UpdateChannel -ne "" -and $buildFolder -ne "" -and $WebsiteTargetOwner -and switch ($UpdateChannel) { "Nightly" { $GithubTag = "$((Get-Date).ToUniversalTime().ToString("yyyyMMdd"))-$TagName-NB" - $html_url = "https://github.com/mRemoteNG/mRemoteNG/releases/tag/$GithubTag" - $browser_download_url = "https://github.com/mRemoteNG/mRemoteNG/releases/download/$GithubTag/$($msiFile.Name)" + $html_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/tag/$GithubTag" + $browser_download_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/download/$GithubTag/$($msiFile.Name)" $a.nightlybuild.name = "v$TagName" $a.nightlybuild.published_at = $published_at $a.nightlybuild.html_url = $html_url @@ -77,8 +81,8 @@ if ($UpdateChannel -ne "" -and $buildFolder -ne "" -and $WebsiteTargetOwner -and } "Preview" { $GithubTag = "$TagName-PB" - $html_url = "https://github.com/mRemoteNG/mRemoteNG/releases/tag/$GithubTag" - $browser_download_url = "https://github.com/mRemoteNG/mRemoteNG/releases/download/$GithubTag/$($msiFile.Name)" + $html_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/tag/$GithubTag" + $browser_download_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/download/$GithubTag/$($msiFile.Name)" $a.prerelease.name = "v$TagName" $a.prerelease.published_at = $published_at $a.prerelease.html_url = $html_url @@ -89,8 +93,8 @@ if ($UpdateChannel -ne "" -and $buildFolder -ne "" -and $WebsiteTargetOwner -and } "Stable" { $GithubTag = "$TagName" - $html_url = "https://github.com/mRemoteNG/mRemoteNG/releases/tag/$GithubTag" - $browser_download_url = "https://github.com/mRemoteNG/mRemoteNG/releases/download/$GithubTag/$($msiFile.Name)" + $html_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/tag/$GithubTag" + $browser_download_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/download/$GithubTag/$($msiFile.Name)" $a.stable.name = "v$TagName" $a.stable.published_at = $published_at $a.stable.html_url = $html_url @@ -112,8 +116,8 @@ if ($UpdateChannel -ne "" -and $buildFolder -ne "" -and $WebsiteTargetOwner -and switch ($UpdateChannel) { "Nightly" { $GithubTag = "$((Get-Date).ToUniversalTime().ToString("yyyyMMdd"))-$TagName-NB" - $html_url = "https://github.com/mRemoteNG/mRemoteNG/releases/tag/$GithubTag" - $browser_download_url = "https://github.com/mRemoteNG/mRemoteNG/releases/download/$GithubTag/$($zipFile.Name)" + $html_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/tag/$GithubTag" + $browser_download_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/download/$GithubTag/$($zipFile.Name)" $a.nightlybuild.name = "v$TagName" $a.nightlybuild.published_at = $published_at $a.nightlybuild.html_url = $html_url @@ -124,8 +128,8 @@ if ($UpdateChannel -ne "" -and $buildFolder -ne "" -and $WebsiteTargetOwner -and } "Preview" { $GithubTag = "$TagName-PB" - $html_url = "https://github.com/mRemoteNG/mRemoteNG/releases/tag/$GithubTag" - $browser_download_url = "https://github.com/mRemoteNG/mRemoteNG/releases/download/$GithubTag/$($zipFile.Name)" + $html_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/tag/$GithubTag" + $browser_download_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/download/$GithubTag/$($zipFile.Name)" $a.prerelease.name = "v$TagName" $a.prerelease.published_at = $published_at $a.prerelease.html_url = $html_url @@ -136,8 +140,8 @@ if ($UpdateChannel -ne "" -and $buildFolder -ne "" -and $WebsiteTargetOwner -and } "Stable" { $GithubTag = "$TagName" - $html_url = "https://github.com/mRemoteNG/mRemoteNG/releases/tag/$GithubTag" - $browser_download_url = "https://github.com/mRemoteNG/mRemoteNG/releases/download/$GithubTag/$($zipFile.Name)" + $html_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/tag/$GithubTag" + $browser_download_url = "https://github.com/$WebsiteTargetOwner/$MainRepository/releases/download/$GithubTag/$($zipFile.Name)" $a.stable.name = "v$TagName" $a.stable.published_at = $published_at $a.stable.html_url = $html_url