Skip to content

Instantly share code, notes, and snippets.

@JimBobSquarePants
Created June 20, 2019 06:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JimBobSquarePants/bee583486a27b62a0356d51dce2d772d to your computer and use it in GitHub Desktop.
Save JimBobSquarePants/bee583486a27b62a0356d51dce2d772d to your computer and use it in GitHub Desktop.
Bash Build Whoas
#!/usr/bin/env bash
set -eu
declare -a build_projects=('./src/My.Extensions.ApiVersioning/')
declare -a test_projects=('./tests/IntegrationTests/' './tests/UnitTests/')
pwsh -NoProfile -ExecutionPolicy Bypass -Command "& '.\build.ps1' -projects " "${build_projects[@]}" "-tests " "${test_projects[@]}"
if [ $# -ne 0 ]; then
echo "Failed to build."
exit 1
fi
echo "Successfully built project."
exit 0
param(
[string[]] $projects,
[string[]] $tests
)
Write-Host "Testing projects."
foreach ($test in $tests) {
Write-Host $test
}
@JimBobSquarePants
Copy link
Author

Why does only the first item in the array get passed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment