You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
DevOps-Bash-tools/setup/install_travis.sh

31 lines
776 B
Bash

#!/usr/bin/env bash
#
# Author: Hari Sekhon
# Date: 2019-09-17
#
# https://github.com/harisekhon/devops-bash-tools
#
# License: see accompanying LICENSE file
#
# https://www.linkedin.com/in/harisekhon
#
# Installs the Travis CI gem to home dir, logs in and generates a $TRAVIS_TOKEN
#
# putting the $TRAVIS_TOKEN in your environment is useful for the travis tools available in
#
# https://github.com/harisekhon/devops-python-tools
set -euo pipefail
[ -n "${DEBUG:-}" ] && set -x
gem install --user-install travis
# add ruby to paths temporarily (logic borrowed from advanced bashrc code in .bash.d/paths.sh)
for ruby_bin in $(find ~/.gem/ruby -maxdepth 2 -name bin -type d 2>/dev/null | tail -r); do
export PATH="$PATH:$ruby_bin"
done
travis login
travis token