alpha_omega 1.3.5 → 1.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/libexec/aoh-proxy +12 -30
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.5
1
+ 1.3.6
@@ -34,41 +34,23 @@ function git_branch_head {
34
34
  echo "$git_branch:$git_head"
35
35
  }
36
36
 
37
- function clone_proxy {
38
- local ver_repo=$2
39
- export _AO_PROXIED=1
40
- rm -rf $shome/.tmp/deploy
41
- local git_url="$(git config --list | grep remote.origin.url | cut -d= -f2-)"
42
- git clone -q $shome $shome/.tmp/deploy
43
- cd $shome/.tmp/deploy
44
- local git_spec="$(git_branch_head "$ver_repo")"
45
- git checkout -q "${git_head##*:}"
46
- exec $shome/.tmp/deploy/sbin/proxy "$git_url" "$git_spec" "$@"
47
- }
48
-
49
- : ${_AO_PROXIED:=}
50
- if [[ -z "$_AO_PROXIED" ]]; then
51
- clone_proxy "$@"
52
- fi
53
-
54
37
  # entry point
55
38
  function main {
56
- local git_url="$1"; shift
57
- local git_spec="$1"; shift
58
39
  local hst_gateway="$1"; shift
59
40
  local ver_repo="$1"; shift
60
- case "$hst_gateway" in
61
- *)
62
- local pth_rvmrun="${_AO_RUBY_LOADER:-}"
63
- : ${pth_rvmrun:=$(ruby -ryaml -e 'puts YAML.load(File.read(ARGV[0]))[ARGV[1]]' $_AO_HOME/config/deploy.yml ruby_loader)}
64
- local nm_ruby="$(ruby -ryaml -e 'puts YAML.load(File.read(ARGV[0]))[ARGV[1]]' $_AO_HOME/config/deploy.yml app_ruby)"
65
41
 
66
- local tmp_remote="$(ssh $hst_gateway mktemp -t XXXXXXXXX)"
67
- scp -q $shome/sbin/remote-helper $hst_gateway:$tmp_remote
68
- ssh -t $hst_gateway "$pth_rvmrun" "$nm_ruby" bash "$tmp_remote" "$USER" "$git_url" "$git_spec" "$@"
69
- ssh $hst_gateway rm -f $tmp_remote
70
- ;;
71
- esac
42
+ cd $_AO_HOME
43
+ local git_url="$(git config --list | grep remote.origin.url | cut -d= -f2-)"
44
+ local git_spec="$(git_branch_head "$ver_repo")"
45
+
46
+ local pth_rvmrun="${_AO_RUBY_LOADER:-}"
47
+ : ${pth_rvmrun:=$(ruby -ryaml -e 'puts YAML.load(File.read(ARGV[0]))[ARGV[1]]' $_AO_HOME/config/deploy.yml ruby_loader)}
48
+ local nm_ruby="$(ruby -ryaml -e 'puts YAML.load(File.read(ARGV[0]))[ARGV[1]]' $_AO_HOME/config/deploy.yml app_ruby)"
49
+
50
+ local tmp_remote="$(ssh $hst_gateway mktemp -t XXXXXXXXX)"
51
+ scp -q $shome/sbin/remote-helper $hst_gateway:$tmp_remote
52
+ ssh -t $hst_gateway "$pth_rvmrun" "$nm_ruby" bash "$tmp_remote" "$USER" "$git_url" "$git_spec" "$@"
53
+ ssh $hst_gateway rm -f $tmp_remote
72
54
  }
73
55
 
74
56
  require sub "$BASH_SOURCE" "$@"
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alpha_omega
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 3
9
- - 5
10
- version: 1.3.5
9
+ - 6
10
+ version: 1.3.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Nghiem