diff --git a/bin/github-pages b/bin/github-pages new file mode 100755 index 00000000..2952d259 --- /dev/null +++ b/bin/github-pages @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby + +command = ARGV[0].to_s.downcase + +case command +when "versions" + require File.expand_path("../../lib/github-pages", __FILE__) + GitHubPages.gems.each { |g,v| puts "gem '#{g}', '#{v}'" } +when "br" + puts [ + "gem 'github-pages'", + ":branch => '#{ARGV[1]}'", + ":git => 'git://github.com/github/pages-gem'" + ].join(", ") +else + abort "error: '#{command}' is an unrecognized command. options are: 'versions', 'br'." +end diff --git a/github-pages.gemspec b/github-pages.gemspec index f1615768..6cd0b238 100644 --- a/github-pages.gemspec +++ b/github-pages.gemspec @@ -11,6 +11,7 @@ Gem::Specification.new do |s| s.email = "support@github.com" s.homepage = "https://github.com/github/pages-gem" s.license = "MIT" + s.executables = ["github-pages"] s.files = ["lib/github-pages.rb"] GitHubPages.gems.each do |gem, version| diff --git a/script/cibuild b/script/cibuild index 59114a9d..bb9e0a39 100755 --- a/script/cibuild +++ b/script/cibuild @@ -1,7 +1,9 @@ #!/bin/sh # Test that all dependencies resolve -set -e +set -ex +bundle exec bin/github-pages versions +bundle exec bin/github-pages br my-branch bundle exec jekyll --version bundle exec rspec