alpha_omega 0.0.113 → 0.0.114
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/bin/alpha_omega +4 -3
- data/libexec/activate +148 -118
- data/libexec/build +148 -118
- data/libexec/bump +148 -118
- data/libexec/check +148 -118
- data/libexec/compare +148 -118
- data/libexec/config +148 -118
- data/libexec/debug +148 -118
- data/libexec/deploy +148 -118
- data/libexec/dist +148 -118
- data/libexec/dna +148 -118
- data/libexec/hosts +148 -118
- data/libexec/invoke +148 -118
- data/libexec/lock +148 -118
- data/libexec/plan +148 -118
- data/libexec/release +148 -118
- data/libexec/restart +148 -118
- data/libexec/rollback +148 -118
- data/libexec/shell +148 -118
- data/libexec/stage +148 -118
- data/libexec/unlock +148 -118
- metadata +3 -3
data/libexec/stage
CHANGED
@@ -10,153 +10,183 @@ if ! echo "$hst_this" | egrep -q "^(admin|develop)"; then
|
|
10
10
|
fi
|
11
11
|
fi
|
12
12
|
|
13
|
-
|
14
|
-
debug)
|
15
|
-
export LOCAL_ONLY=true
|
13
|
+
export LOCAL_ONLY=true
|
16
14
|
|
17
|
-
|
18
|
-
cap $(for a in "$@"; do echo $a.echo; done)
|
19
|
-
}
|
20
|
-
;;
|
15
|
+
default_pod=$(cat /etc/podname 2>&- || true)
|
21
16
|
|
22
|
-
|
23
|
-
|
17
|
+
case "$(basename $0)" in
|
18
|
+
invoke)
|
19
|
+
export COMMAND="$1"; shift
|
24
20
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
;;
|
21
|
+
if [[ -n $1 ]]; then
|
22
|
+
set $(for a in "$@"; do if [[ $default_pod = $a ]]; then echo "default.app"; else echo $a.app; fi; done)
|
23
|
+
fi
|
29
24
|
|
30
|
-
|
31
|
-
|
25
|
+
LOCAL_ONLY=
|
26
|
+
tmp_invoke=$(mktemp -t XXXXXXXXX)
|
27
|
+
bundle exec cap "$@" invoke 2>&1 | perl -pe 's{.\[\d+m}{}g' | perl -ne 'm{^\s*\*+\s*\[(out|err)\s*::\s*([^]]+)\] ?(.*)} && print "$1 $2 $3\n"' > $tmp_invoke 2>&1
|
32
28
|
|
33
|
-
{
|
34
|
-
|
35
|
-
|
36
|
-
|
29
|
+
cat $tmp_invoke | awk '{print $2}' | sort -u | while read -r nm_host; do
|
30
|
+
egrep "^(out|err) $nm_host" $tmp_invoke || true
|
31
|
+
echo
|
32
|
+
done
|
33
|
+
rm -f $tmp_invoke
|
37
34
|
;;
|
35
|
+
*)
|
36
|
+
if [[ -n $1 ]]; then
|
37
|
+
set $(for a in "$@"; do if [[ $default_pod = $a ]]; then echo "default"; else echo $a; fi; done)
|
38
|
+
fi
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
;;
|
48
|
-
minor)
|
49
|
-
echo "$1.$(($2 + 1)).0"
|
50
|
-
;;
|
51
|
-
major)
|
52
|
-
echo "$(($1 + 1)).0.0"
|
53
|
-
;;
|
54
|
-
esac > VERSION
|
55
|
-
;;
|
56
|
-
*)
|
57
|
-
ver_new=$1; shift
|
58
|
-
set $(echo "$ver_new" | sed 's#\.# #g') 0
|
59
|
-
M=$1; shift
|
60
|
-
m=$1; shift
|
61
|
-
p=$1; shift
|
62
|
-
|
63
|
-
tmp_version=$(mktemp -t XXXXXXXXX)
|
64
|
-
(echo "$(($M+0)).$(($m+0)).$(($p+0))" > $tmp_version) 2>&-
|
65
|
-
ver_new_same=$(cat $tmp_version)
|
66
|
-
rm -f $tmp_version
|
67
|
-
|
68
|
-
if [[ $ver_new = $ver_new_same ]]; then
|
69
|
-
echo "$ver_new" > VERSION
|
70
|
-
else
|
71
|
-
echo "ERROR: invalid version: $ver_new" 1>&2
|
72
|
-
exit 1
|
40
|
+
case "$(basename $0)" in
|
41
|
+
debug)
|
42
|
+
if [[ -z $1 ]]; then
|
43
|
+
set "world"
|
44
|
+
fi
|
45
|
+
|
46
|
+
if [[ -n $1 ]]; then
|
47
|
+
cap $(for a in "$@"; do echo $a.echo; done)
|
73
48
|
fi
|
74
49
|
;;
|
75
|
-
esac
|
76
50
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
51
|
+
hosts)
|
52
|
+
{
|
53
|
+
if [[ -n $1 ]]; then
|
54
|
+
cap $(for a in "$@"; do echo $a.echo; done)
|
55
|
+
fi
|
56
|
+
} 2>&1 | grep eea914aaa8dde6fdae29242b1084a2b0415eefaf | awk '{print $NF}' | sort -u
|
57
|
+
;;
|
58
|
+
|
59
|
+
dna)
|
60
|
+
{
|
61
|
+
echo "eea914aaa8dde6fdae29242b1084a2b0415eefaf ---"
|
62
|
+
if [[ -n $1 ]]; then
|
63
|
+
cap $(for a in "$@"; do echo $a.yaml; done)
|
64
|
+
fi
|
65
|
+
} 2>&1 | grep eea914aaa8dde6fdae29242b1084a2b0415eefaf | sed 's#eea914aaa8dde6fdae29242b1084a2b0415eefaf ##'
|
66
|
+
;;
|
67
|
+
|
68
|
+
bump)
|
69
|
+
case "$1" in
|
70
|
+
patch|minor|major)
|
71
|
+
bump=$1; shift
|
72
|
+
set $(cat VERSION | sed 's#\.# #g')
|
73
|
+
case "$bump" in
|
74
|
+
patch)
|
75
|
+
echo "$1.$2.$(($3 + 1))"
|
76
|
+
;;
|
77
|
+
minor)
|
78
|
+
echo "$1.$(($2 + 1)).0"
|
79
|
+
;;
|
80
|
+
major)
|
81
|
+
echo "$(($1 + 1)).0.0"
|
82
|
+
;;
|
83
|
+
esac > VERSION
|
84
|
+
;;
|
85
|
+
*)
|
86
|
+
ver_new=$1; shift
|
87
|
+
set $(echo "$ver_new" | sed 's#\.# #g') 0
|
88
|
+
M=$1; shift
|
89
|
+
m=$1; shift
|
90
|
+
p=$1; shift
|
91
|
+
|
92
|
+
tmp_version=$(mktemp -t XXXXXXXXX)
|
93
|
+
(echo "$(($M+0)).$(($m+0)).$(($p+0))" > $tmp_version) 2>&-
|
94
|
+
ver_new_same=$(cat $tmp_version)
|
95
|
+
rm -f $tmp_version
|
96
|
+
|
97
|
+
if [[ $ver_new = $ver_new_same ]]; then
|
98
|
+
echo "$ver_new" > VERSION
|
99
|
+
else
|
100
|
+
echo "ERROR: invalid version: $ver_new" 1>&2
|
101
|
+
exit 1
|
102
|
+
fi
|
103
|
+
;;
|
104
|
+
esac
|
81
105
|
|
82
|
-
|
106
|
+
if [[ -f Gemfile ]]; then
|
107
|
+
bundle check 2>&1 >/dev/null || { bundle --quiet install --local --path vendor/bundle || bundle check > /dev/null; }
|
108
|
+
git add Gemfile.lock
|
109
|
+
fi
|
83
110
|
|
84
|
-
|
85
|
-
git commit -m "bump: $ver_bumped"
|
86
|
-
git tag "v$ver_bumped"
|
87
|
-
echo $ver_bumped
|
88
|
-
;;
|
111
|
+
git add VERSION
|
89
112
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
bundle exec cap "$@" deploy
|
113
|
+
ver_bumped=$(cat VERSION)
|
114
|
+
git commit -m "bump: $ver_bumped"
|
115
|
+
git tag "v$ver_bumped"
|
116
|
+
echo $ver_bumped
|
95
117
|
;;
|
96
118
|
|
97
|
-
|
98
|
-
|
99
|
-
|
119
|
+
*)
|
120
|
+
LOCAL_ONLY=
|
121
|
+
if [[ -n $1 ]]; then
|
122
|
+
set $(for a in "$@"; do echo $a.app; done)
|
123
|
+
fi
|
124
|
+
case "$(basename $0)" in
|
125
|
+
deploy)
|
126
|
+
bundle exec cap "$@" deploy
|
127
|
+
;;
|
100
128
|
|
101
|
-
|
102
|
-
|
103
|
-
|
129
|
+
release)
|
130
|
+
bundle exec cap "$@" deploy
|
131
|
+
;;
|
104
132
|
|
105
|
-
|
106
|
-
|
107
|
-
|
133
|
+
stage)
|
134
|
+
bundle exec cap "$@" deploy:update_code
|
135
|
+
;;
|
108
136
|
|
109
|
-
|
110
|
-
|
111
|
-
|
137
|
+
restart)
|
138
|
+
bundle exec cap "$@" deploy:restart
|
139
|
+
;;
|
112
140
|
|
113
|
-
|
114
|
-
|
115
|
-
|
141
|
+
config)
|
142
|
+
bundle exec cap "$@" deploy:config
|
143
|
+
;;
|
116
144
|
|
117
|
-
|
118
|
-
|
119
|
-
|
145
|
+
build)
|
146
|
+
bundle exec cap "$@" deploy:build
|
147
|
+
;;
|
120
148
|
|
121
|
-
|
122
|
-
|
123
|
-
|
149
|
+
dist)
|
150
|
+
bundle exec cap "$@" deploy:dist
|
151
|
+
;;
|
124
152
|
|
125
|
-
|
126
|
-
|
127
|
-
|
153
|
+
activate)
|
154
|
+
bundle exec cap "$@" deploy:symlink deploy:restart
|
155
|
+
;;
|
128
156
|
|
129
|
-
|
130
|
-
|
131
|
-
|
157
|
+
rollback)
|
158
|
+
bundle exec cap "$@" deploy:rollback
|
159
|
+
;;
|
132
160
|
|
133
|
-
|
134
|
-
|
135
|
-
|
161
|
+
check)
|
162
|
+
bundle exec cap "$@" deploy:check
|
163
|
+
;;
|
136
164
|
|
137
|
-
|
138
|
-
|
139
|
-
|
165
|
+
compare)
|
166
|
+
bundle exec cap "$@" deploy:compare
|
167
|
+
;;
|
140
168
|
|
141
|
-
|
142
|
-
|
143
|
-
|
169
|
+
plan)
|
170
|
+
bundle exec cap "$@" deploy:plan
|
171
|
+
;;
|
144
172
|
|
145
|
-
|
146
|
-
|
147
|
-
|
173
|
+
lock)
|
174
|
+
bundle exec cap "$@" deploy:lock
|
175
|
+
;;
|
148
176
|
|
149
|
-
|
150
|
-
|
151
|
-
|
177
|
+
unlock)
|
178
|
+
bundle exec cap "$@" deploy:unlock
|
179
|
+
;;
|
152
180
|
|
153
|
-
|
154
|
-
|
155
|
-
|
181
|
+
shell)
|
182
|
+
bundle exec cap "$@" shell
|
183
|
+
;;
|
156
184
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
185
|
+
*)
|
186
|
+
bundle exec cap "$@"
|
187
|
+
;;
|
188
|
+
esac
|
189
|
+
esac
|
190
|
+
;;
|
161
191
|
esac
|
162
192
|
|
data/libexec/unlock
CHANGED
@@ -10,153 +10,183 @@ if ! echo "$hst_this" | egrep -q "^(admin|develop)"; then
|
|
10
10
|
fi
|
11
11
|
fi
|
12
12
|
|
13
|
-
|
14
|
-
debug)
|
15
|
-
export LOCAL_ONLY=true
|
13
|
+
export LOCAL_ONLY=true
|
16
14
|
|
17
|
-
|
18
|
-
cap $(for a in "$@"; do echo $a.echo; done)
|
19
|
-
}
|
20
|
-
;;
|
15
|
+
default_pod=$(cat /etc/podname 2>&- || true)
|
21
16
|
|
22
|
-
|
23
|
-
|
17
|
+
case "$(basename $0)" in
|
18
|
+
invoke)
|
19
|
+
export COMMAND="$1"; shift
|
24
20
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
;;
|
21
|
+
if [[ -n $1 ]]; then
|
22
|
+
set $(for a in "$@"; do if [[ $default_pod = $a ]]; then echo "default.app"; else echo $a.app; fi; done)
|
23
|
+
fi
|
29
24
|
|
30
|
-
|
31
|
-
|
25
|
+
LOCAL_ONLY=
|
26
|
+
tmp_invoke=$(mktemp -t XXXXXXXXX)
|
27
|
+
bundle exec cap "$@" invoke 2>&1 | perl -pe 's{.\[\d+m}{}g' | perl -ne 'm{^\s*\*+\s*\[(out|err)\s*::\s*([^]]+)\] ?(.*)} && print "$1 $2 $3\n"' > $tmp_invoke 2>&1
|
32
28
|
|
33
|
-
{
|
34
|
-
|
35
|
-
|
36
|
-
|
29
|
+
cat $tmp_invoke | awk '{print $2}' | sort -u | while read -r nm_host; do
|
30
|
+
egrep "^(out|err) $nm_host" $tmp_invoke || true
|
31
|
+
echo
|
32
|
+
done
|
33
|
+
rm -f $tmp_invoke
|
37
34
|
;;
|
35
|
+
*)
|
36
|
+
if [[ -n $1 ]]; then
|
37
|
+
set $(for a in "$@"; do if [[ $default_pod = $a ]]; then echo "default"; else echo $a; fi; done)
|
38
|
+
fi
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
;;
|
48
|
-
minor)
|
49
|
-
echo "$1.$(($2 + 1)).0"
|
50
|
-
;;
|
51
|
-
major)
|
52
|
-
echo "$(($1 + 1)).0.0"
|
53
|
-
;;
|
54
|
-
esac > VERSION
|
55
|
-
;;
|
56
|
-
*)
|
57
|
-
ver_new=$1; shift
|
58
|
-
set $(echo "$ver_new" | sed 's#\.# #g') 0
|
59
|
-
M=$1; shift
|
60
|
-
m=$1; shift
|
61
|
-
p=$1; shift
|
62
|
-
|
63
|
-
tmp_version=$(mktemp -t XXXXXXXXX)
|
64
|
-
(echo "$(($M+0)).$(($m+0)).$(($p+0))" > $tmp_version) 2>&-
|
65
|
-
ver_new_same=$(cat $tmp_version)
|
66
|
-
rm -f $tmp_version
|
67
|
-
|
68
|
-
if [[ $ver_new = $ver_new_same ]]; then
|
69
|
-
echo "$ver_new" > VERSION
|
70
|
-
else
|
71
|
-
echo "ERROR: invalid version: $ver_new" 1>&2
|
72
|
-
exit 1
|
40
|
+
case "$(basename $0)" in
|
41
|
+
debug)
|
42
|
+
if [[ -z $1 ]]; then
|
43
|
+
set "world"
|
44
|
+
fi
|
45
|
+
|
46
|
+
if [[ -n $1 ]]; then
|
47
|
+
cap $(for a in "$@"; do echo $a.echo; done)
|
73
48
|
fi
|
74
49
|
;;
|
75
|
-
esac
|
76
50
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
51
|
+
hosts)
|
52
|
+
{
|
53
|
+
if [[ -n $1 ]]; then
|
54
|
+
cap $(for a in "$@"; do echo $a.echo; done)
|
55
|
+
fi
|
56
|
+
} 2>&1 | grep eea914aaa8dde6fdae29242b1084a2b0415eefaf | awk '{print $NF}' | sort -u
|
57
|
+
;;
|
58
|
+
|
59
|
+
dna)
|
60
|
+
{
|
61
|
+
echo "eea914aaa8dde6fdae29242b1084a2b0415eefaf ---"
|
62
|
+
if [[ -n $1 ]]; then
|
63
|
+
cap $(for a in "$@"; do echo $a.yaml; done)
|
64
|
+
fi
|
65
|
+
} 2>&1 | grep eea914aaa8dde6fdae29242b1084a2b0415eefaf | sed 's#eea914aaa8dde6fdae29242b1084a2b0415eefaf ##'
|
66
|
+
;;
|
67
|
+
|
68
|
+
bump)
|
69
|
+
case "$1" in
|
70
|
+
patch|minor|major)
|
71
|
+
bump=$1; shift
|
72
|
+
set $(cat VERSION | sed 's#\.# #g')
|
73
|
+
case "$bump" in
|
74
|
+
patch)
|
75
|
+
echo "$1.$2.$(($3 + 1))"
|
76
|
+
;;
|
77
|
+
minor)
|
78
|
+
echo "$1.$(($2 + 1)).0"
|
79
|
+
;;
|
80
|
+
major)
|
81
|
+
echo "$(($1 + 1)).0.0"
|
82
|
+
;;
|
83
|
+
esac > VERSION
|
84
|
+
;;
|
85
|
+
*)
|
86
|
+
ver_new=$1; shift
|
87
|
+
set $(echo "$ver_new" | sed 's#\.# #g') 0
|
88
|
+
M=$1; shift
|
89
|
+
m=$1; shift
|
90
|
+
p=$1; shift
|
91
|
+
|
92
|
+
tmp_version=$(mktemp -t XXXXXXXXX)
|
93
|
+
(echo "$(($M+0)).$(($m+0)).$(($p+0))" > $tmp_version) 2>&-
|
94
|
+
ver_new_same=$(cat $tmp_version)
|
95
|
+
rm -f $tmp_version
|
96
|
+
|
97
|
+
if [[ $ver_new = $ver_new_same ]]; then
|
98
|
+
echo "$ver_new" > VERSION
|
99
|
+
else
|
100
|
+
echo "ERROR: invalid version: $ver_new" 1>&2
|
101
|
+
exit 1
|
102
|
+
fi
|
103
|
+
;;
|
104
|
+
esac
|
81
105
|
|
82
|
-
|
106
|
+
if [[ -f Gemfile ]]; then
|
107
|
+
bundle check 2>&1 >/dev/null || { bundle --quiet install --local --path vendor/bundle || bundle check > /dev/null; }
|
108
|
+
git add Gemfile.lock
|
109
|
+
fi
|
83
110
|
|
84
|
-
|
85
|
-
git commit -m "bump: $ver_bumped"
|
86
|
-
git tag "v$ver_bumped"
|
87
|
-
echo $ver_bumped
|
88
|
-
;;
|
111
|
+
git add VERSION
|
89
112
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
bundle exec cap "$@" deploy
|
113
|
+
ver_bumped=$(cat VERSION)
|
114
|
+
git commit -m "bump: $ver_bumped"
|
115
|
+
git tag "v$ver_bumped"
|
116
|
+
echo $ver_bumped
|
95
117
|
;;
|
96
118
|
|
97
|
-
|
98
|
-
|
99
|
-
|
119
|
+
*)
|
120
|
+
LOCAL_ONLY=
|
121
|
+
if [[ -n $1 ]]; then
|
122
|
+
set $(for a in "$@"; do echo $a.app; done)
|
123
|
+
fi
|
124
|
+
case "$(basename $0)" in
|
125
|
+
deploy)
|
126
|
+
bundle exec cap "$@" deploy
|
127
|
+
;;
|
100
128
|
|
101
|
-
|
102
|
-
|
103
|
-
|
129
|
+
release)
|
130
|
+
bundle exec cap "$@" deploy
|
131
|
+
;;
|
104
132
|
|
105
|
-
|
106
|
-
|
107
|
-
|
133
|
+
stage)
|
134
|
+
bundle exec cap "$@" deploy:update_code
|
135
|
+
;;
|
108
136
|
|
109
|
-
|
110
|
-
|
111
|
-
|
137
|
+
restart)
|
138
|
+
bundle exec cap "$@" deploy:restart
|
139
|
+
;;
|
112
140
|
|
113
|
-
|
114
|
-
|
115
|
-
|
141
|
+
config)
|
142
|
+
bundle exec cap "$@" deploy:config
|
143
|
+
;;
|
116
144
|
|
117
|
-
|
118
|
-
|
119
|
-
|
145
|
+
build)
|
146
|
+
bundle exec cap "$@" deploy:build
|
147
|
+
;;
|
120
148
|
|
121
|
-
|
122
|
-
|
123
|
-
|
149
|
+
dist)
|
150
|
+
bundle exec cap "$@" deploy:dist
|
151
|
+
;;
|
124
152
|
|
125
|
-
|
126
|
-
|
127
|
-
|
153
|
+
activate)
|
154
|
+
bundle exec cap "$@" deploy:symlink deploy:restart
|
155
|
+
;;
|
128
156
|
|
129
|
-
|
130
|
-
|
131
|
-
|
157
|
+
rollback)
|
158
|
+
bundle exec cap "$@" deploy:rollback
|
159
|
+
;;
|
132
160
|
|
133
|
-
|
134
|
-
|
135
|
-
|
161
|
+
check)
|
162
|
+
bundle exec cap "$@" deploy:check
|
163
|
+
;;
|
136
164
|
|
137
|
-
|
138
|
-
|
139
|
-
|
165
|
+
compare)
|
166
|
+
bundle exec cap "$@" deploy:compare
|
167
|
+
;;
|
140
168
|
|
141
|
-
|
142
|
-
|
143
|
-
|
169
|
+
plan)
|
170
|
+
bundle exec cap "$@" deploy:plan
|
171
|
+
;;
|
144
172
|
|
145
|
-
|
146
|
-
|
147
|
-
|
173
|
+
lock)
|
174
|
+
bundle exec cap "$@" deploy:lock
|
175
|
+
;;
|
148
176
|
|
149
|
-
|
150
|
-
|
151
|
-
|
177
|
+
unlock)
|
178
|
+
bundle exec cap "$@" deploy:unlock
|
179
|
+
;;
|
152
180
|
|
153
|
-
|
154
|
-
|
155
|
-
|
181
|
+
shell)
|
182
|
+
bundle exec cap "$@" shell
|
183
|
+
;;
|
156
184
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
185
|
+
*)
|
186
|
+
bundle exec cap "$@"
|
187
|
+
;;
|
188
|
+
esac
|
189
|
+
esac
|
190
|
+
;;
|
161
191
|
esac
|
162
192
|
|
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:
|
4
|
+
hash: 251
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 114
|
10
|
+
version: 0.0.114
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Nghiem
|