Skip to content

Instantly share code, notes, and snippets.

@agross
Created May 17, 2019 08:56
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 agross/e6e5880a94b4acaa791cce8ff1195e2a to your computer and use it in GitHub Desktop.
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)
:; 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