Closed indented-automation closed 7 years ago
tempted to use a require statement as it's the cleanest, but we could potentially use the Invoke-build.ps1 so that require would not 'always' work...
That question might be down to what's best practice: adding the Invoke-Build.ps1
, or sticking with using the InvokeBuild
module?
One is more 'convenient' as it's standalone, but that's also why .init exists. And that means InvokeBuild would not be kept up-to-date and tested, so I'd lean towards using the module...
Requires gets the thumbs up from me. Well documented, highly visible.
On 7 Apr 2017 17:42, "Gael" notifications@github.com wrote:
tempted to use a require statement as it's the cleanest, but we could potentially use the Invoke-build.ps1 so that require would not 'always' work... That question might be down to what's best practice: adding the Invoke-Build.ps1, or sticking with using the InvokeBuild module? One is more 'convenient' as it's standalone, but that's also why .init exists. And that means InvokeBuild would not be kept up-to-date and tested, so I'd lean towards using the module...
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/gaelcolas/SampleModule/issues/3#issuecomment-292588158, or mute the thread https://github.com/notifications/unsubscribe-auth/AMO6Du-ysjyEPNNBWUyyxdbKg6N_qt7gks5rtmePgaJpZM4M27gz .
This is done in #5, pending review :)
Merged to master in #5
If .build executes without the Invoke-Build module errors are thrown because property and task are not recognised commands. Script should require Invoke-Build module.