Sha256: e98e08bc50412a3fb46c1afd71756733944cfa3c4ca74ab4c07296b90d61f061
Contents?: true
Size: 833 Bytes
Versions: 21
Compression:
Stored size: 833 Bytes
Contents
require "bard/git" require "bard/command" module Bard::CLI::Stage def self.included mod mod.class_eval do desc "stage [branch=HEAD]", "pushes current branch, and stages it" def stage branch=Bard::Git.current_branch unless config.servers.key?(:production) raise Thor::Error.new("`bard stage` is disabled until a production server is defined. Until then, please use `bard deploy` to deploy to the staging server.") end run! "git push -u origin #{branch}", verbose: true config[:staging].run! "git fetch && git checkout -f origin/#{branch} && bin/setup" puts green("Stage Succeeded") ping :staging rescue Bard::Command::Error => e puts red("!!! ") + "Running command failed: #{yellow(e.message)}" exit 1 end end end end
Version data entries
21 entries across 21 versions & 1 rubygems