Sha256: cd0aaeeaa7992782eb6bc5e4417d553b83959d3805d5a94a88c334870eaea6fd
Contents?: true
Size: 880 Bytes
Versions: 178
Compression:
Stored size: 880 Bytes
Contents
#!/usr/bin/env ruby require 'rbbt' require 'rbbt-util' require 'rbbt/workflow' workflow = ARGV[0] repo = ARGV[1] raise "No workflow specified" if workflow.nil? workflow_dir = Rbbt.etc.workflow_dir.exists? ? Rbbt.etc.workflow_dir.read.strip : Rbbt.workflows.find(:user) FileUtils.mkdir_p workflow_dir unless File.exists? workflow_dir Misc.in_dir(workflow_dir) do case when File.exists?(Misc.snake_case(workflow)) Misc.in_dir(Misc.snake_case(workflow)) do `git pull` end when File.exists?(workflow) Misc.in_dir(workflow) do `git pull` end else if repo.nil? repo_base_url = Rbbt.etc.workflow_repo.exists? ? Rbbt.etc.workflow_repo.read.strip : 'https://github.com/Rbbt-Workflows/' repo = File.join(repo_base_url, Misc.snake_case(workflow) + '.git') end Log.warn "Cloning #{ repo }" `git clone "#{repo}"` end end
Version data entries
178 entries across 178 versions & 1 rubygems