I am new to psake and I have this issue: I have 2 psake scripts:
(1): base_tasks.ps1:
properties{
$a = "hello"
$b = "hi"
}
task One{
Write-Host $a
}
(2): install.ps1
Include .\base_tasks.ps1
properties{
$a = "Goodbye"
$b = "Adjeu"
}
task default -depends One
Now, is it possible to override the properties and variables from file 1? I want to use file 1 as "base tasks" and use those tasks in the install.ps1 and override the properties. Or do I have to do that an other way? I will invoke install.ps1 and use my $a and $b from install.ps1.
- DanceAlot
From the source, it looks like
Properties
is just a function:So when you call it again, it will just add the properties again.
The properties are then converted into variables like so: