Skip to content

Instantly share code, notes, and snippets.

@oehme
Created December 15, 2014 16:46
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 oehme/15427b2243d27f24aa5e to your computer and use it in GitHub Desktop.
Save oehme/15427b2243d27f24aa5e to your computer and use it in GitHub Desktop.
require 'travis'
Travis.access_token = Travis.github_auth(ENV['TRAVIS_TOKEN'])
repos = Travis::Repository.find_all(owner_name: 'oehme')
keys = ['ORG_GRADLE_PROJECT_bintrayApiKey', 'ORG_GRADLE_PROJECT_signingPassword', 'ORG_GRADLE_PROJECT_sonatypePassword']
repos.each do |repo|
keys.each do |key|
puts "Setting env var '#{key}' on project '#{repo.slug}'"
repo.env_vars.upsert(key, "'#{ENV[key]}'", public: false)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment