Skip to content

Commit 3ad5d4d

Browse files
authored
Fix inability to deploy Lifetime after Platform Server upgrade (#87)
* Platform Upgrades install Service Center * Allows deployment after Plataform Upgrade System Components are already deployed in the Upgrade * Remove test that no longer applies * Update CHANGELOG.md * Increase version to 3.7.1.0
1 parent 66029a6 commit 3ad5d4d

6 files changed

Lines changed: 7 additions & 32 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Outsystems.SetupTools Release History
22

3+
## 3.7.1.0
4+
5+
- Publish-OSPlatformLifetime: Allowed to run after a Platform Server upgrade
6+
37
## 3.7.0.0
48

59
- Set-OSServerConfig: Added SectionAttribute and SectionAttributeValue parameters

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 3.7.0.{build}
1+
version: 3.7.1.{build}
22

33
only_commits:
44
files:

src/Outsystems.SetupTools/Functions/Publish-OSPlatformLifetime.ps1

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -117,18 +117,6 @@ function Publish-OSPlatformLifetime
117117
return $installResult
118118
}
119119

120-
if ($(GetSysComponentsCompiledVersion) -ne $osVersion)
121-
{
122-
LogMessage -Function $($MyInvocation.Mycommand) -Phase 1 -Stream 3 -Message "System Components version mismatch. You should run the Publish-OSPlatformSystemComponents first"
123-
WriteNonTerminalError -Message "System Components version mismatch. You should run the Publish-OSPlatformSystemComponents first"
124-
125-
$installResult.Success = $false
126-
$installResult.ExitCode = -1
127-
$installResult.Message = 'System Components version mismatch. You should run the Publish-OSPlatformSystemComponents first'
128-
129-
return $installResult
130-
}
131-
132120
if ($(GetLifetimeCompiledVersion) -ne $osVersion)
133121
{
134122
$doInstall = $true

src/Outsystems.SetupTools/Functions/Set-OSServerConfig.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ function Set-OSServerConfig
444444
return $null
445445
}
446446

447-
if ($PSBoundParameters.InstallServiceCenter.IsPresent)
447+
if ($PSBoundParameters.InstallServiceCenter.IsPresent -or $PSBoundParameters.UpgradeEnvironment.IsPresent)
448448
{
449449
# Flag service center installation
450450
try

src/Outsystems.SetupTools/OutSystems.SetupTools.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
RootModule = 'OutSystems.SetupTools.psm1'
1313

1414
# Version number of this module.
15-
ModuleVersion = '3.7.0.0'
15+
ModuleVersion = '3.7.1.0'
1616

1717
# Supported PSEditions
1818
# CompatiblePSEditions = @()

test/unit/Publish-OSPlatformLifetime.Tests.ps1

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -51,23 +51,6 @@ InModuleScope -ModuleName OutSystems.SetupTools {
5151
It 'Should not throw' { { Publish-OSPlatformLifetime -ErrorAction SilentlyContinue } | Should Not throw }
5252
}
5353

54-
Context 'When system components are not installed or have a wrong version' {
55-
56-
Mock GetSysComponentsCompiledVersion { return $null }
57-
58-
$result = Publish-OSPlatformLifetime -ErrorVariable err -ErrorAction SilentlyContinue
59-
60-
It 'Should not run the installation' { Assert-MockCalled @assNotRunPublishSolution}
61-
It 'Should return the right result' {
62-
$result.Success | Should Be $false
63-
$result.RebootNeeded | Should Be $false
64-
$result.ExitCode | Should Be -1
65-
$result.Message | Should Be 'System Components version mismatch. You should run the Publish-OSPlatformSystemComponents first'
66-
}
67-
It 'Should output an error' { $err[-1] | Should Be 'System Components version mismatch. You should run the Publish-OSPlatformSystemComponents first' }
68-
It 'Should not throw' { { Publish-OSPlatformLifetime -ErrorAction SilentlyContinue } | Should Not throw }
69-
}
70-
7154
Context 'When lifetime and the platform dont have the same version' {
7255

7356
Mock GetLifetimeCompiledVersion { return '10.0.0.0' }

0 commit comments

Comments
 (0)