-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
88 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
|
||
if ( -Not $PsBuildTaskBranch ) { | ||
$PsBuildTaskBranch = 'main' | ||
} | ||
|
||
#region InvokeBuild | ||
|
||
task UpdateBuildTasks { | ||
Invoke-WebRequest ` | ||
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/Powershell/Build.Tasks.ps1" ` | ||
-OutFile "$PSScriptRoot\Build.Tasks.ps1" | ||
} | ||
|
||
#endregion | ||
#region GitHub Actions | ||
|
||
task UpdateValidationWorkflow { | ||
[System.IO.FileInfo] $file = "$PSScriptRoot/../.github/workflows/build-validation.yml" | ||
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue | ||
Invoke-WebRequest ` | ||
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/GitHub/build-validation-windows.yml" ` | ||
-OutFile $file | ||
} | ||
|
||
task UpdatePreReleaseWorkflow { | ||
requires ModuleName | ||
[System.IO.FileInfo] $file = "$PSScriptRoot\..\.github\workflows\pre-release.yml" | ||
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue | ||
Invoke-WebRequest ` | ||
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/GitHub/pre-release-windows.yml" | | ||
ForEach-Object { $_ -replace 'MyModuleName', $ModuleName } | | ||
Out-File $file -NoNewline | ||
} | ||
|
||
task UpdateReleaseWorkflow { | ||
requires ModuleName | ||
[System.IO.FileInfo] $file = "$PSScriptRoot\..\.github\workflows\release.yml" | ||
New-Item -Type Directory $file.Directory -ErrorAction SilentlyContinue | ||
Invoke-WebRequest ` | ||
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/GitHub/release-windows.yml" | | ||
ForEach-Object { $_ -replace 'MyModuleName', $ModuleName } | | ||
Out-File $file -NoNewline | ||
} | ||
|
||
#endregion | ||
#region GitHub Pages | ||
|
||
task UpdateIndexPage { | ||
New-Item -Type Directory "$PSScriptRoot\..\docs" -ErrorAction SilentlyContinue | ||
Invoke-WebRequest ` | ||
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/docs/index.md" ` | ||
-OutFile "$PSScriptRoot\..\docs\index.md" | ||
Invoke-WebRequest ` | ||
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/docs/_config.yml" ` | ||
-OutFile "$PSScriptRoot\..\docs\_config.yml" | ||
} | ||
|
||
#endregion | ||
#region VsCode | ||
|
||
task UpdateVsCodeTasks { | ||
Invoke-WebRequest ` | ||
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/VsCode/tasks.json" ` | ||
-OutFile "$PSScriptRoot\..\.vscode\tasks.json" | ||
} | ||
|
||
#endregion | ||
#region PsBuildTasks | ||
|
||
task UpdatePsBuildTasksTasks { | ||
Invoke-WebRequest ` | ||
-Uri "https://raw.githubusercontent.com/abbgrade/PsBuildTasks/$PsBuildTaskBranch/tasks/PowerShell-Windows.Tasks.ps1" ` | ||
-OutFile "$PSScriptRoot\PsBuild.Tasks.ps1" | ||
} | ||
|
||
#endregion | ||
|
||
task UpdatePsBuildTasks -Jobs UpdateBuildTasks, UpdateValidationWorkflow, UpdatePreReleaseWorkflow, UpdateIndexPage, UpdateReleaseWorkflow, UpdateVsCodeTasks, UpdatePsBuildTasksTasks |