-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.build.ps1
60 lines (46 loc) · 1.69 KB
/
.build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<#
.Synopsis
Build script <https://github.com/nightroman/Invoke-Build>
.Example
# Create module from source.
Invoke-Build Build
.Example
# Add doc templates for new command.
# BE CAREFUL! Existing documents will be overwritten and must be discarded using git.
Invoke-Build Doc.Init -ForceDocInit
#>
param(
[string] $NuGetApiKey = $env:nuget_apikey,
# Overwrite published versions
[switch] $ForcePublish,
# Add doc templates for new command.
[switch] $ForceDocInit,
# Version suffix to prereleases
[int] $BuildNumber
)
$ModuleName = 'psdocker'
. $PSScriptRoot\Tasks\Dependencies.Tasks.ps1
. $PSScriptRoot\Tasks\Build.Tasks.ps1
# Synopsis: Default task.
task . Build
task UpdateBuildTasks {
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/Powershell/Build.Tasks.ps1' `
-OutFile "$PSScriptRoot\Tasks\Build.Tasks.ps1"
}
task UpdateValidationWorkflow {
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/build-validation-matrix.yml' `
-OutFile "$PSScriptRoot\.github\workflows\build-validation.yml"
}
task UpdatePreReleaseWorkflow {
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/pre-release-windows.yml' `
-OutFile "$PSScriptRoot\.github\workflows\pre-release.yml"
}
task UpdateReleaseWorkflow {
Invoke-WebRequest `
-Uri 'https://raw.githubusercontent.com/abbgrade/PsBuildTasks/main/GitHub/release-windows.yml' `
-OutFile "$PSScriptRoot\.github\workflows\release.yml"
}
task UpdatePsBuildTasks -Jobs UpdateBuildTasks, UpdateValidationWorkflow, UpdatePreReleaseWorkflow, UpdateReleaseWorkflow