pake

GNU Make like simple build/automation tool implemented with Powershell

How Does it Work?

Usage

pake TARGET

Compatibility

Compatible only Powershell > 7.0 and later for now.

Default Task

define a variable in your pakefile.ps by $default="build" and execute pake without parameter.

Installing

Import-Module PowerShellGet
Register-PSRepository -Name "guneysu" -SourceLocation "https://www.myget.org/F/guneysu/api/v2"
Install-Module -Name "pake" -Repository "guneysu" -Scope CurrentUser

Example pakefile.ps1

## pakefile.ps1

$default="build";

function build () {
    dotnet build .\src\Pake\Pake.sln -c Release
    copy-item .\src\Pake\pake\bin\Release\net5.0\pake.dll pake\lib\
}

function publish () {
    Publish-Module -Path .\pake -Repository guneysu -NuGetApiKey $env:MYGET_SECRET
}

function upgrade {
    Import-Module PowerShellGet
    Register-PSRepository -Name "guneysu" -SourceLocation "https://www.myget.org/F/guneysu/api/v2"
    Install-Module -Name "pake" -Repository "guneysu" -Verbose
}

function test {
    Write-Output "TEST";
    $env:PSModulePath+="$(pwd);"
    import-module pake -force -verbose
    pake upgrade
}

TODOs