Kill script/sync-puppet

This commit is contained in:
John Barnette
2013-01-21 14:32:08 -08:00
parent 7b60211666
commit ca4bdcf021
2 changed files with 0 additions and 65 deletions

View File

@@ -22,24 +22,3 @@ Sometimes it's not possible to follow these rules, but try hard.
## Contributing
Use the OS X system Ruby (1.8.7). Run `script/tests` often. Open PR's.
### Managing Boxen's Puppet Modules
There are roughly nine million puppet modules under the
[Boxen GitHub organization][boxen]. To clone them all, run
`script/sync-puppet`. This script will make sure every
`boxen/puppet-*` repo is cloned under the `./puppet` directory, which is
ignored by Git.
[boxen]: https://github.com/boxen
Because it uses the GitHub API, `script/sync-puppet` requires the
`GITHUB_LOGIN` and `GITHUB_PASSWORD` environment variables to be set.
If you don't want to provide them every time, you can set them in
`.env.local.rb`, which is also ignored by Git. For example, your
`.env.local.rb` might look like this:
```ruby
ENV["GITHUB_LOGIN"] = "jbarnette"
ENV["GITHUB_PASSWORD"] = "adventures"
```

View File

@@ -1,44 +0,0 @@
#!/usr/bin/env ruby
# Make sure all boxen/puppet-* repos are cloned under ./puppet.
require "fileutils"
require "pathname"
# Put us where we belong, in the root dir of boxen.
Dir.chdir Pathname.new(__FILE__).realpath + "../.."
# Load the local env in case creds are set there.
load ".env.local.rb" if File.file? ".env.local.rb"
# Make sure we're up to date.
abort "Bootstrap failed." unless system "script/bootstrap"
require "rubygems"
require "bundler/setup"
require "octokit"
unless ENV["GITHUB_LOGIN"] && ENV["GITHUB_PASSWORD"]
abort "Please set the GITHUB_LOGIN and GITHUB_PASSWORD env vars."
end
api = Octokit::Client.new \
:login => ENV["GITHUB_LOGIN"], :password => ENV["GITHUB_PASSWORD"]
# Gotta have a ./puppet dir.
FileUtils.mkdir_p "puppet"
# Clone boxen/puppet-* unless we have it already.
api.organization_repositories("boxen").each do |repo|
next unless /^puppet-/ =~ repo.name
dest = "puppet/" + repo.name[7..-1]
unless File.directory? dest
system "git", "clone", repo.clone_url, dest
end
end