Skip to content

Commit cf11918

Browse files
committed
Merge branch 'dev'
2 parents 7bafb4e + a860578 commit cf11918

6 files changed

Lines changed: 63 additions & 50 deletions

File tree

azure-pipelines.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ resources:
1717
type: github
1818
name: theohbrothers/PSModulePublisher
1919
endpoint: startersclan # Check for your 'Type: Github' connection under 'Project Settings' > 'Service connections'
20-
ref: refs/tags/v0.2.1
20+
ref: refs/tags/v0.3.2
2121
- repository: PSRepositoryReleaseManager
2222
type: github
2323
name: theohbrothers/PSRepositoryReleaseManager
2424
endpoint: startersclan
25-
ref: refs/tags/v0.3.0
25+
ref: refs/tags/v0.4.4
2626

2727
stages:
2828
- stage: build_test
@@ -35,11 +35,11 @@ stages:
3535
steps:
3636
- checkout: self
3737
submodules: recursive
38-
- template: templates/azure-pipelines/windows/pwsh/continuous-build.yml@PSModulePublisher
38+
- template: templates/azure-pipelines/entrypoint/windows/continuous-build.yml@PSModulePublisher
3939
- job: linux_container
4040
displayName: '[Linux] [Container] PowerShell'
4141
pool:
42-
vmImage: ubuntu-16.04
42+
vmImage: ubuntu-18.04
4343
strategy:
4444
matrix:
4545
6.2.0:
@@ -50,23 +50,23 @@ stages:
5050
steps:
5151
- checkout: self
5252
submodules: recursive
53-
- template: templates/azure-pipelines/linux/continuous-build.yml@PSModulePublisher
53+
- template: templates/azure-pipelines/entrypoint/linux/continuous-build.yml@PSModulePublisher
5454
- job: windows_powershell_5_1
5555
displayName: '[Windows] PowerShell 5.1'
5656
pool:
5757
vmImage: windows-2019
5858
steps:
5959
- checkout: self
6060
submodules: recursive
61-
- template: templates/azure-pipelines/windows/powershell/continuous-build.yml@PSModulePublisher
61+
- template: templates/azure-pipelines/entrypoint/windows/powershell/continuous-build.yml@PSModulePublisher
6262
- job: windows_powershell_5_0
6363
displayName: '[Windows] PowerShell 5.0'
6464
pool:
6565
vmImage: vs2015-win2012r2
6666
steps:
6767
- checkout: self
6868
submodules: recursive
69-
- template: templates/azure-pipelines/windows/powershell/continuous-build.yml@PSModulePublisher
69+
- template: templates/azure-pipelines/entrypoint/windows/powershell/continuous-build.yml@PSModulePublisher
7070
- stage: publish
7171
displayName: Publish
7272
dependsOn: build_test
@@ -78,18 +78,19 @@ stages:
7878
steps:
7979
- checkout: self
8080
submodules: recursive
81-
- template: templates/azure-pipelines/windows/pwsh/continuous-build.yml@PSModulePublisher
82-
- template: templates/azure-pipelines/windows/pwsh/publish.yml@PSModulePublisher
81+
- template: templates/azure-pipelines/entrypoint/windows/continuous-build.yml@PSModulePublisher
82+
- template: templates/azure-pipelines/entrypoint/windows/publish.yml@PSModulePublisher
8383
- stage: release
8484
displayName: Release
8585
dependsOn: publish
8686
jobs:
8787
- job: linux_container
88-
displayName: '[Linux] [Container]'
88+
displayName: '[Linux] [Container] PowerShell Core'
8989
pool:
90-
vmImage: ubuntu-16.04
91-
container: joeltimothyoh/powershell:6.1.0-ubuntu-18.04-git-sudo
90+
vmImage: ubuntu-18.04
91+
container: joeltimothyoh/powershell:6.1.0-ubuntu-18.04-git
9292
steps:
9393
- checkout: self
9494
submodules: recursive
95-
- template: templates/azure-pipelines/pwsh/release.yml@PSRepositoryReleaseManager
95+
- template: templates/azure-pipelines/entrypoint/generate.yml@PSRepositoryReleaseManager
96+
- template: templates/azure-pipelines/entrypoint/release.yml@PSRepositoryReleaseManager

build/PSModulePublisher

Submodule PSModulePublisher updated 50 files

build/PSRepositoryReleaseManager

test/scripts/dep/Install-TestDependencies.ps1

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,34 @@ try {
1616
}
1717
Get-Module Pester -ListAvailable
1818

19-
Set-StrictMode -Off
20-
if ($IsLinux) {
21-
"Installing dependencies for linux" | Write-Host
19+
if ($env:OS -ne 'Windows_NT') {
20+
if ($IsLinux) {
21+
"Installing dependencies for linux" | Write-Host
2222

23-
# Provisioning script block
24-
$provisionScriptBlock = {
25-
$sudo = sh -c 'command -v sudo'
26-
$shellBin = sh -c 'command -v bash || command -v sh'
27-
$sudo | Write-Host
28-
$shellBin | Write-Host
29-
"Shell command:" | Write-Verbose
30-
$script:shellArgs | Write-Verbose
31-
if ($sudo) {
32-
'Executing command with sudo' | Write-Host
33-
& $sudo $shellBin @script:shellArgs | Write-Host
34-
}else {
35-
& $shellBin @script:shellArgs | Write-Host
23+
# Provisioning script block
24+
$provisionScriptBlock = {
25+
$sudo = sh -c 'command -v sudo'
26+
$shellBin = sh -c 'command -v bash || command -v sh'
27+
$sudo | Write-Host
28+
$shellBin | Write-Host
29+
"Shell command:" | Write-Verbose
30+
$script:shellArgs | Write-Verbose
31+
if ($sudo) {
32+
'Executing command with sudo' | Write-Host
33+
& $sudo $shellBin @script:shellArgs | Write-Host
34+
}else {
35+
& $shellBin @script:shellArgs | Write-Host
36+
}
37+
if ($LASTEXITCODE) { throw "An error occurred." }
3638
}
37-
if ($LASTEXITCODE) { throw "An error occurred." }
38-
}
3939

40-
# Install linux dependencies
41-
$shellArgs = @(
42-
'linux/sourcepawn-dependencies.sh'
43-
)
44-
& $provisionScriptBlock
40+
# Install linux dependencies
41+
$shellArgs = @(
42+
'linux/sourcepawn-dependencies.sh'
43+
)
44+
& $provisionScriptBlock
45+
}
4546
}
46-
Set-StrictMode -Version Latest
4747

4848
}catch {
4949
throw

test/scripts/integration/Run-IntegrationTests.ps1

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,24 @@ $VerbosePreference = 'Continue'
66

77
$failedCount = 0
88

9-
"Function: Compile-SourceScript" | Write-Host
109
$functionTestScriptBlock = {
1110
try {
12-
Compile-SourceScript @cmdArgs
11+
"Command: $script:cmd" | Write-Verbose
12+
"Args:" | Write-Verbose
13+
$script:cmdArgs | Out-String -Stream | % { $_.Trim() } | ? { $_ } | Write-Verbose
14+
for ($i=0; $i -le $iterations-1; $i++) {
15+
"Iteration: $($i+1)" | Write-Host
16+
& $script:cmd @cmdArgs
17+
}
1318
}catch {
1419
$_ | Write-Error
1520
$script:failedCount++
1621
}
1722
}
1823

24+
# Function: Compile-SourceScript
25+
$cmd = "Compile-SourceScript"
26+
1927
#############
2028
# SourceMod #
2129
#############
@@ -25,8 +33,8 @@ $cmdArgs = @{
2533
File = "$PSScriptRoot\..\..\mod\sourcemod\addons\sourcemod\scripting\plugin1.sp"
2634
Force = $true
2735
}
28-
$cmdArgs | Out-String -Stream | % { $_.Trim() } | ? { $_ } | Write-Verbose
29-
1..2 | % { "Iteration: $_" | Write-Host; & $functionTestScriptBlock }
36+
$iterations = 2
37+
& $functionTestScriptBlock
3038

3139

3240
"`n[sourcemod] Compile plugin via compiler" | Write-Host
@@ -35,8 +43,8 @@ $cmdArgs = @{
3543
Force = $true
3644
SkipWrapper = $true
3745
}
38-
$cmdArgs | Out-String -Stream | % { $_.Trim() } | ? { $_ } | Write-Verbose
39-
1..2 | % { "Iteration: $_" | Write-Host; & $functionTestScriptBlock }
46+
$iterations = 2
47+
& $functionTestScriptBlock
4048

4149

4250
#############
@@ -52,8 +60,8 @@ if ($env:OS) {
5260
File = "$PSScriptRoot\..\..\mod\amxmodx\addons\amxmodx\scripting\plugin1.sma"
5361
Force = $true
5462
}
55-
$cmdArgs | Out-String -Stream | % { $_.Trim() } | ? { $_ } | Write-Verbose
56-
1..2 | % { "Iteration: $_" | Write-Host; & $functionTestScriptBlock }
63+
$iterations = 2
64+
& $functionTestScriptBlock
5765
}else { "Skipping: Test only applicable to Windows." | Write-Host }
5866

5967
"`n[amxmodx] Compile plugin via compiler" | Write-Host
@@ -62,8 +70,8 @@ $cmdArgs = @{
6270
Force = $true
6371
SkipWrapper = $true
6472
}
65-
$cmdArgs | Out-String -Stream | % { $_.Trim() } | ? { $_ } | Write-Verbose
66-
1..2 | % { "Iteration: $_" | Write-Host; & $functionTestScriptBlock }
73+
$iterations = 2
74+
& $functionTestScriptBlock
6775

6876

6977
###########

test/test.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ $VerbosePreference = 'Continue'
66
$global:PesterDebugPreference_ShowFullErrors = $true
77

88
try {
9+
Push-Location $PSScriptRoot
10+
911
# Install test dependencies
1012
"Installing test dependencies" | Write-Host
1113
& "$PSScriptRoot\scripts\dep\Install-TestDependencies.ps1" > $null
@@ -27,12 +29,14 @@ try {
2729
}
2830

2931
"Listing test artifacts" | Write-Host
30-
git ls-files --others --exclude-standard $PSScriptRoot
32+
git ls-files --others --exclude-standard
3133

3234
"End of tests" | Write-Host
3335
if ($testFailed) {
3436
throw "One or more tests failed."
3537
}
3638
}catch {
3739
throw
40+
}finally {
41+
Pop-Location
3842
}

0 commit comments

Comments
 (0)