-
Notifications
You must be signed in to change notification settings - Fork 54
added build scripts and pester tests #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
build.ps1
Outdated
@@ -0,0 +1,87 @@ | |||
#!/usr/bin/env pwsh | |||
param( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot header oops
|
||
# Remove the built nuget package | ||
Remove-Item -Recurse -Force package/bin -ErrorAction SilentlyContinue | ||
Remove-Item -Recurse -Force package/obj -ErrorAction SilentlyContinue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not git clean -fdx
?
|
||
task Build { | ||
exec { dotnet build } | ||
exec { dotnet publish } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we pass in the configuration to use for the build and publish?
} | ||
|
||
task Test { | ||
Set-Location test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are assuming $pwd
is at the root folder, is that a safe assumption? This is the case in other tasks too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is assumed because InvokeBuild sets the location to whatever BuildRoot is set to:
https://github.com/nightroman/Invoke-Build/wiki/Build-Scripts-Guidelines#use-the-default-or-custom-buildroot
test/Modules/Microsoft.Azure.Functions.PowerShellWorker.Tests.ps1
Outdated
Show resolved
Hide resolved
test/Modules/Microsoft.Azure.Functions.PowerShellWorker.Tests.ps1
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sign off with a few minor comments.
This adds 3 things:
You can invoke the build script in many ways:
build.ps1
- just buildsbuild.ps1 -Clean
- Cleans and buildsbuild.ps1 -Bootstrap
- tells you what dependencies you are missingbuild.ps1 -Test
- Builds and tests both xunit and Pester