paasio 0.3.16.beta.2 → 0.3.16.1
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.
- data/lib/cli/commands/apps.rb +18 -5
- data/lib/cli/config.rb +1 -1
- data/lib/cli/runner.rb +1 -0
- data/lib/cli/version.rb +1 -1
- data/lib/vmc/const.rb +1 -1
- metadata +7 -10
data/lib/cli/commands/apps.rb
CHANGED
@@ -230,8 +230,8 @@ module VMC::Cli::Command
|
|
230
230
|
# check deploy status
|
231
231
|
deploy = client.app_most_recent_deploy(appname)
|
232
232
|
if deploy && deploy[:sha]
|
233
|
-
unless
|
234
|
-
unless ask("The last commit in the currently deployed code is:\n #{deploy[:sha]}
|
233
|
+
unless has_commit?(app, @path, deploy[:sha])
|
234
|
+
unless ask("The last commit in the currently deployed code is:\n #{deploy[:sha]}\n\nThe current path doesn't include that commit.\nManually uploading may revert changes.\nContinue anyway?", :default => false)
|
235
235
|
exit 0
|
236
236
|
end
|
237
237
|
end
|
@@ -247,8 +247,8 @@ module VMC::Cli::Command
|
|
247
247
|
# check deploy status
|
248
248
|
deploy = client.app_most_recent_deploy(name)
|
249
249
|
if deploy && deploy[:sha]
|
250
|
-
unless
|
251
|
-
unless ask("The last commit in the currently deployed code is:\n #{deploy[:sha]}
|
250
|
+
unless has_commit?(app, @application, deploy[:sha])
|
251
|
+
unless ask("The last commit in the currently deployed code is:\n #{deploy[:sha]}\n\nThe current path doesn't include that commit.\nManually uploading may revert changes.\nContinue anyway?", :default => false)
|
252
252
|
exit 0
|
253
253
|
end
|
254
254
|
end
|
@@ -985,7 +985,7 @@ module VMC::Cli::Command
|
|
985
985
|
:memory => mem_quota
|
986
986
|
},
|
987
987
|
}
|
988
|
-
manifest[:scm_type] = @options[:scm_type]
|
988
|
+
manifest[:scm_type] = @options[:scm_type] || 'git' unless @options[:skip_scm]
|
989
989
|
|
990
990
|
# Send the manifest to the cloud controller
|
991
991
|
client.create_app(appname, manifest)
|
@@ -1236,12 +1236,25 @@ module VMC::Cli::Command
|
|
1236
1236
|
$?.success?
|
1237
1237
|
end
|
1238
1238
|
|
1239
|
+
def has_commit?(app, path, sha)
|
1240
|
+
case app[:scm_type]
|
1241
|
+
when 'git'
|
1242
|
+
has_git_commit?(path, sha)
|
1243
|
+
when 'hg'
|
1244
|
+
has_hg_commit?(path, sha)
|
1245
|
+
end
|
1246
|
+
end
|
1247
|
+
|
1239
1248
|
def has_git_commit?(path, sha)
|
1240
1249
|
result = git("--git-dir=#{File.expand_path(File.join(path, '.git'))} branch --contains #{sha}")
|
1241
1250
|
return false unless $?.success?
|
1242
1251
|
!!(result =~ /^\*\s/)
|
1243
1252
|
end
|
1244
1253
|
|
1254
|
+
def has_hg_commit?(path, sha)
|
1255
|
+
true # TODO
|
1256
|
+
end
|
1257
|
+
|
1245
1258
|
def git(args)
|
1246
1259
|
return "" unless has_git?
|
1247
1260
|
flattened_args = [args].flatten.compact.join(" ")
|
data/lib/cli/config.rb
CHANGED
data/lib/cli/runner.rb
CHANGED
@@ -88,6 +88,7 @@ class VMC::Cli::Runner
|
|
88
88
|
|
89
89
|
opts.on('--remote REMOTE') { |r| @options[:remote] = r }
|
90
90
|
opts.on('--scm-type TYPE') { |t| @options[:scm_type] = t if t == 'git' || t == 'hg' }
|
91
|
+
opts.on('--skip-scm') { @options[:skip_scm] = true }
|
91
92
|
|
92
93
|
# deprecated
|
93
94
|
opts.on('--exec EXEC') { |exec| @options[:exec] = exec }
|
data/lib/cli/version.rb
CHANGED
data/lib/vmc/const.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paasio
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
4
|
+
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
8
|
- 16
|
9
|
-
-
|
10
|
-
|
11
|
-
version: 0.3.16.beta.2
|
9
|
+
- 1
|
10
|
+
version: 0.3.16.1
|
12
11
|
platform: ruby
|
13
12
|
authors:
|
14
13
|
- PaaS.io
|
@@ -16,7 +15,7 @@ autorequire:
|
|
16
15
|
bindir: bin
|
17
16
|
cert_chain: []
|
18
17
|
|
19
|
-
date: 2012-02-
|
18
|
+
date: 2012-02-12 00:00:00 -08:00
|
20
19
|
default_executable:
|
21
20
|
dependencies:
|
22
21
|
- !ruby/object:Gem::Dependency
|
@@ -228,13 +227,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
228
227
|
version: "0"
|
229
228
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
230
229
|
requirements:
|
231
|
-
- - "
|
230
|
+
- - ">="
|
232
231
|
- !ruby/object:Gem::Version
|
233
232
|
segments:
|
234
|
-
-
|
235
|
-
|
236
|
-
- 1
|
237
|
-
version: 1.3.1
|
233
|
+
- 0
|
234
|
+
version: "0"
|
238
235
|
requirements: []
|
239
236
|
|
240
237
|
rubyforge_project:
|