Sha256: 01da09748898ff615d4caf1e685de597f5057b664f672fb48f2dc7706e4ad34e
Contents?: true
Size: 665 Bytes
Versions: 1
Compression:
Stored size: 665 Bytes
Contents
#!/usr/bin/env ruby STDOUT.sync = true require 'trollop' opts = Trollop.options do banner <<-EOS jgd is an automated deployer of Jekyll site to Github Pages Usage: jgd [options] EOS opt :url, 'Github URL', type: String, default: '' opt :branch, 'Destination branch', type: String, default: 'gh-pages' end branch = opts[:branch] fail 'branch can\'t be empty' if branch.empty? url = opts[:url] url = `git config --get remote.origin.url`.strip if url.empty? spec = Gem::Specification.find_by_name('jgd') root = spec.gem_dir script = File.join(root, 'bash/deploy.sh') fail 'deployment failed, see log above' \ unless system("#{script} #{url} #{branch}")
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jgd-1.7.1 | bin/jgd |