Sha256: 7fc787c4d95700af63b5b795024c2651ec94d2ed2fbb1d07c125b37f45c8441f
Contents?: true
Size: 1.28 KB
Versions: 2
Compression:
Stored size: 1.28 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 #{bundler_options} >/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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
alpha_omega-1.4.1 | libexec/aoh-init |
alpha_omega-1.4.0 | libexec/aoh-init |