Created
June 20, 2019 06:03
-
-
Save JimBobSquarePants/bee583486a27b62a0356d51dce2d772d to your computer and use it in GitHub Desktop.
Bash Build Whoas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param( | |
[string[]] $projects, | |
[string[]] $tests | |
) | |
Write-Host "Testing projects." | |
foreach ($test in $tests) { | |
Write-Host $test | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Why does only the first item in the array get passed?