Skip to content

Instantly share code, notes, and snippets.

@jmahowald
Created October 4, 2017 05:25
Show Gist options
  • Save jmahowald/ae3dd90418574639d707abc138ed1321 to your computer and use it in GitHub Desktop.
Save jmahowald/ae3dd90418574639d707abc138ed1321 to your computer and use it in GitHub Desktop.
Scriptlet to allow one to easily set secure environment variables for all travis repos. H/T https://github.com/travis-ci/travis-ci/issues/2069#issuecomment-300425169
#!/bin/bash
PATTERN=$1
ENV_VAR=$2
travis repos --pro --no-interactive -m $1 | xargs -n1 travis env set $ENV_VAR ${!ENV_VAR} --private --repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment