GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - PoshCode/Tasks: Shared Invoke-Build Tasks ...

BranchesTags
Open more actions menu

Latest commit

 

History

69 Commits
69 Commits

Folders and files

NameName
Last commit message
Last commit date
.markdownlint.json
.markdownlint.json
 
 
Build.build.ps1
Build.build.ps1
 
 
Clean.Task.ps1
Clean.Task.ps1
 
 
DockerBuild.Task.ps1
DockerBuild.Task.ps1
 
 
DotNetBuild.Task.ps1
DotNetBuild.Task.ps1
 
 
DotNetPack.Task.ps1
DotNetPack.Task.ps1
 
 
DotNetPublish.Task.ps1
DotNetPublish.Task.ps1
 
 
DotNetPush.Task.ps1
DotNetPush.Task.ps1
 
 
DotNetRestore.Task.ps1
DotNetRestore.Task.ps1
 
 
DotNetTest.Task.ps1
DotNetTest.Task.ps1
 
 
Earthfile
Earthfile
 
 
GitVersion.Task.ps1
GitVersion.Task.ps1
 
 
GitVersion.yml
GitVersion.yml
 
 
PSModuleAnalyze.Task.ps1
PSModuleAnalyze.Task.ps1
 
 
PSModuleBuild.Task.ps1
PSModuleBuild.Task.ps1
 
 
PSModuleImport.Task.ps1
PSModuleImport.Task.ps1
 
 
PSModulePush.Task.ps1
PSModulePush.Task.ps1
 
 
PSModuleRestore.Task.ps1
PSModuleRestore.Task.ps1
 
 
PSModuleTest.Task.ps1
PSModuleTest.Task.ps1
 
 
README.md
README.md
 
 
ScriptAnalyzerSettings.psd1
ScriptAnalyzerSettings.psd1
 
 
TagSource.Task.ps1
TagSource.Task.ps1
 
 
_Bootstrap.ps1
_Bootstrap.ps1
 
 
_Initialize.ps1
_Initialize.ps1
 
 

Repository files navigation

Opinionated Build Tasks for Invoke-Build

  • Requires PowerShell 7.2 or later.
  • Should work with any module from my PowerShellTemplate.

I've started using Invoke-Build to run my builds in PowerShell (due mostly to unhappiness with GitHub and Azure Pipelines). This is a collection of tasks I've written that get shared by all my project builds.

Usage

Your .build.ps1 script must set variables:

For PowerShell modules

  • $PSModuleName
    • The name of the module you're building.
    • There must be a .psd1 module manifest with this name in your source.
    • The build will create a folder with this name in the output folder

If you're including building a dotnet project, it's also recommended to set

  • $DotNetPublishRoot
    • The target folder for dotnet publish.
    • Defaults to $OutputRoot/publish
    • For PowerShell modules, I always override this to $BuildRoot/lib and add that to the CopyDirectories list in my ModuleBuilder build.psd1 so that it gets copied to the output folder by ModuleBuilder.

For DotNet assemblies

  • $dotnetProjects
    • Specifies which projects to build
    • I recommend you put this as a parameter on your Build.ps1
      • Set the default to the full list of your assembly projects
      • Add an alias: "Projects"
  • $dotnetTestProjects
    • Specifies which projects are test projects
    • I recommend you put this as a parameter on your Build.ps1
    • Add an alias: "TestProjects"
  • $dotnetOptions
    • Specifies further options to pass to dotnet
    • I recommend you put this as a parameter on your Build.ps1
    • Add an alias: "Options"
    • Example values: "-verbosity" = "minimal" "-runtime" = "linux-x64"

About

Shared Invoke-Build Tasks ...

Resources

Readme
Activity
Custom properties

Stars

5 stars

Watchers

1 watching

Forks

4 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.