Sha256: e5d36ae4e3c1e74d83e8cde007cec1bece4e62f47a0ad3b415ac1b236e172ea1
Contents?: true
Size: 1.29 KB
Versions: 29
Compression:
Stored size: 1.29 KB
Contents
#!/bin/bash #/ NAME #/ init -- #/ #/ SYNOPSIS #/ #/ init # figure out the project root under which bin, lib live shome="$(cd -P -- "$(dirname -- "$BASH_SOURCE")/.." && pwd -P)" # load a jason bourne library source "$shome/libexec/_treadstone" function main { if [[ "$#" < 1 ]]; then logger_fatal "missing application name" exit 1 fi local nm_app="$1"; shift local dollar='$' cat > "Capfile" <<EOF #!/usr/bin/env ruby require 'alpha_omega/deploy' # application deploy namespace :${nm_app} do namespace :bundle do task :ruby do run "PATH=${dollar}PATH:/usr/local/rvm/bin:${dollar}HOME/.rvm/bin; { cd #{deploy_release} && #{ruby_loader} bundle check 2>&1 >/dev/null; } || #{ruby_loader} bundle --local --path vendor/bundle >/dev/null" end end end # overrides namespace :deploy do task :bundle do ${nm_app}.bundle.ruby end end # interesting hosts Deploy self, __FILE__ do |admin, node| if node["run_list"].include?("role[something_something]") { :deploy => { } } end end EOF mkdir -p "config" cat > "config/deploy.yml" <<EOF --- repository: git@github.com:someone/something_something application: ${nm_app} ruby_loader: rvm-exec app_ruby: ree branches: [ production staging master ] branch_regex: / EOF } require sub "$BASH_SOURCE" "$@"
Version data entries
29 entries across 29 versions & 1 rubygems