Skip to content

Commit

Permalink
Merge branch 'master' of github.com:github/pages-gem
Browse files Browse the repository at this point in the history
* 'master' of github.com:github/pages-gem:
  Update cibuild for new subcommands.
  Create two subcommands: 'versions', 'br'.
  Print directly in executable. h/t @ixti
  Test the executable
  Add executable.
  Output the dependency versions for this build of Pages.
  • Loading branch information
parkr committed Jul 1, 2014
2 parents 172f6a2 + 8e1f7fd commit 0d6c54b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
17 changes: 17 additions & 0 deletions bin/github-pages
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions github-pages.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
4 changes: 3 additions & 1 deletion script/cibuild
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 0d6c54b

Please sign in to comment.