Created
May 17, 2019 08:56
-
-
Save agross/e6e5880a94b4acaa791cce8ff1195e2a to your computer and use it in GitHub Desktop.
TeamCity Command Line Runner script that supports both Windows (cmd) and *nix (sh)
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
:; if [ -z 0 ]; then | |
goto :windows | |
fi | |
# Linux script follows. | |
if [ ! -f .ruby-version ]; then | |
echo %ruby.version% > .ruby-version | |
fi | |
rbenv install --skip-existing && \ | |
printf 'Using Ruby %%s\n' "$(rbenv local)" | |
exit $? | |
:windows | |
@rem Windows script follows. | |
ruby.exe --version || echo ##teamcity[buildProblem description='Ruby installation was not found.'] && exit 127 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment