File tree Expand file tree Collapse file tree 5 files changed +68
-55
lines changed Expand file tree Collapse file tree 5 files changed +68
-55
lines changed Original file line number Diff line number Diff line change @@ -19,20 +19,33 @@ jobs:
1919 fat :
2020 - --fat
2121 - ' '
22- success-version :
23- - ' 3'
24- - ' v3.21.0-beta.10'
25- - ' 3-stable'
26- - ' 3-edge'
27- - ' 3-edge'
28- - ' 3-latest'
29- - ' 3-dev'
30- - ' stable'
31- - ' edge'
32- - ' latest'
33- - ' dev'
34- - ' bin/lando'
35- - ' set-with-envvar'
22+ include :
23+ - version : ' 3'
24+ check : ' v3.'
25+ - version : ' v3.21.0-beta.10'
26+ check : ' v3.21.0-beta.10'
27+ - version : ' 3-stable'
28+ check : ' v3.'
29+ - version : ' 3-edge'
30+ check : ' v3.'
31+ - version : ' 3-edge'
32+ check : ' v3.'
33+ - version : ' 3-latest'
34+ check : ' v3.'
35+ - version : ' 3-dev'
36+ check : ' v3\..*\..*-.*-.*'
37+ - version : ' stable'
38+ check : ' v3.'
39+ - version : ' edge'
40+ check : ' v3.'
41+ - version : ' latest'
42+ check : ' v3.'
43+ - version : ' dev'
44+ check : ' v3.'
45+ - version : ' bin/lando'
46+ check : ' v3.100.999-babylon.5'
47+ - version : ' set-with-envvar'
48+ check : ' v3.22.0'
3649
3750 steps :
3851 - name : Checkout code
@@ -44,13 +57,13 @@ jobs:
4457 with :
4558 node-version : ${{ matrix.node-version }}
4659 cache : npm
47- - name : Setup Lando version ${{ matrix.success- version }}
60+ - name : Setup Lando version ${{ matrix.version }}
4861 shell : bash
4962 run : |
50- if [[ "${{ matrix.success- version }}" == "set-with-envvar" ]]; then
63+ if [[ "${{ matrix.version }}" == "set-with-envvar" ]]; then
5164 LANDO_VERSION=v3.22.0 ./setup-lando.sh --no-setup ${{ matrix.fat }}
5265 else
53- ./setup-lando.sh --version=${{ matrix.success- version }} --no-setup ${{ matrix.fat }}
66+ ./setup-lando.sh --version=${{ matrix.version }} --no-setup ${{ matrix.fat }}
5467 fi
5568
56- lando version --all
69+ lando version | grep -E '${{ matrix.check }}'
Original file line number Diff line number Diff line change 5454 throw "Error: lando is not where we expect it!"
5555 }
5656
57- if (-not (lando version | Select-String -Pattern "${{ matrix.old-version }}" -SimpleMatch )) {
57+ if (-not (lando version | Select-String -Pattern "${{ matrix.old-version }}")) {
5858 throw "Error: lando is not the version we expect!"
5959 }
6060
6868 throw "Error: lando is not where we expect it!"
6969 }
7070
71- lando version
72- Get-ChildItem -Path "$env:USERPROFILE\.lando\plugins\@lando"
73-
74-
75- if (-not (lando version | Select-String -Pattern "${{ matrix.version }}" -SimpleMatch)) {
76- throw "Error: lando is not the version we expect!"
71+ if (-not (lando version | Select-String -Pattern "${{ matrix.version }}")) {
72+ $reported = & "lando version"
73+ throw "Error: lando is not the version we expect! expected ${{ matrix.version}} but found $reported"
7774 }
Original file line number Diff line number Diff line change @@ -15,45 +15,47 @@ jobs:
1515 fat :
1616 - -Fat
1717 - ' '
18- success-version :
19- - ' 3'
20- - ' v3.21.0-beta.10'
21- - ' 3-stable'
22- - ' 3-edge'
23- - ' 3-edge'
24- - ' 3-latest'
25- - ' 3-dev'
26- - ' stable'
27- - ' edge'
28- - ' latest'
29- - ' dev'
30- - ' skip'
18+ include :
19+ - version : ' 3'
20+ check : ' v3.*.*'
21+ - version : ' v3.21.0-beta.10'
22+ check : ' v3.21.0-beta.10'
23+ - version : ' 3-stable'
24+ check : ' v3.*.*'
25+ - version : ' 3-edge'
26+ check : ' v3.*.*'
27+ - version : ' 3-latest'
28+ check : ' v3.*.*'
29+ - version : ' 3-dev'
30+ check : ' v3.*.*'
31+ - version : ' stable'
32+ check : ' v3.*.*'
33+ - version : ' edge'
34+ check : ' v3.*.*'
35+ - version : ' latest'
36+ check : ' v3.*.*'
37+ - version : ' dev'
38+ check : ' v3.*.*-*-*'
39+ - version : ' set-with-envvar'
40+ check : ' v3.22.0'
3141
3242 steps :
3343 - name : Checkout code
3444 uses : actions/checkout@v4
3545 with :
3646 fetch-depth : 0
37- - name : Setup Lando version ${{ matrix.success- version }} ${{ matrix.fat }}
47+ - name : Setup Lando version ${{ matrix.version }} ${{ matrix.fat }}
3848 shell : powershell # 5.1
3949 run : |
4050 # skip command
41- if ("${{ matrix.success- version }}" -eq "skip ") {
51+ if ("${{ matrix.version }}" -eq "set-with-envvar ") {
4252 $env:LANDO_VERSION = "v3.22.0"
4353 .\setup-lando.ps1 -NoSetup ${{ matrix.fat }} -Debug
4454 } else {
45- .\setup-lando.ps1 -Version=${{ matrix.success- version }} -NoSetup ${{ matrix.fat }} -Debug
55+ .\setup-lando.ps1 -Version=${{ matrix.version }} -NoSetup ${{ matrix.fat }} -Debug
4656 }
4757
48- lando version --all
49-
50- # test slim|fat on lando 3
51- if (lando version | Select-String "v3.") {
52- if (${{ matrix.fat }} -eq "-Fat") {
53- lando config --path cli.slim | Select-String "false"
54- }
55- else {
56- lando config --path cli.slim | Select-String "true"
57- }
58+ if (-not (lando version | Select-String -Pattern "${{ matrix.check }}")) {
59+ $reported = & "lando version"
60+ throw "Error: lando is not the version we expect! expected ${{ matrix.version}} but found $reported"
5861 }
59-
Original file line number Diff line number Diff line change 11## {{ UNRELEASED_VERSION }} - [ {{ UNRELEASED_DATE }}] ({{ UNRELEASED_LINK }})
22
33* Added ` path ` based installation to POSIX ` setup-lando.sh ` script
4+ * Added GitHub Actions ` RUNNER_DEBUG ` support to PowerShell script
45* Fixed bug preventing POSIX/Windows script from replacing existing ` lando ` installations
56
67## v3.4.5 - [ November 10, 2024] ( https://github.com/lando/setup-lando/releases/tag/v3.4.5 )
Original file line number Diff line number Diff line change @@ -66,6 +66,9 @@ Set-StrictMode -Version 1
6666# We'll still need to check exit codes on any exe we run.
6767$ErrorActionPreference = " Stop"
6868
69+ # Allow github actions to set $Debug
70+ if ($env: RUNNER_DEBUG -ne $null -and $env: RUNNER_DEBUG -ne " " ) {$Debug = $true }
71+
6972# Normalize debug preference
7073$DebugPreference = If ($Debug ) { " Continue" } Else { $DebugPreference }
7174if ($DebugPreference -eq " Inquire" -or $DebugPreference -eq " Continue" ) {
@@ -74,9 +77,6 @@ if ($DebugPreference -eq "Inquire" -or $DebugPreference -eq "Continue") {
7477$Host.PrivateData.DebugForegroundColor = " Gray"
7578$Host.PrivateData.DebugBackgroundColor = $Host.UI.RawUI.BackgroundColor
7679
77- # Allow github actions to set $Debug
78- if ($env: RUNNER_DEBUG ) {$Debug = $true }
79-
8080# Encoding must be Unicode to support parsing wsl.exe output
8181[Console ]::OutputEncoding = [System.Text.Encoding ]::Unicode
8282
You can’t perform that action at this time.
0 commit comments