bonethug 0.0.33 → 0.0.35
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/bonethug/cli.rb +42 -2
- data/lib/bonethug/installer.rb +5 -0
- data/lib/bonethug/version.rb +1 -1
- data/skel/project_types/drupal/composer.json +2 -1
- metadata +1 -1
data/lib/bonethug/cli.rb
CHANGED
@@ -41,7 +41,47 @@ module Bonethug
|
|
41
41
|
# run the initaliser
|
42
42
|
Installer.bonethugise(location, task.to_sym)
|
43
43
|
|
44
|
-
when
|
44
|
+
when 'run',
|
45
|
+
'rake',
|
46
|
+
'drush',
|
47
|
+
'sake'
|
48
|
+
|
49
|
+
# get env
|
50
|
+
environment = ARGV.last
|
51
|
+
|
52
|
+
# handle args
|
53
|
+
if task == 'run'
|
54
|
+
cmd_task = ARGV[1]
|
55
|
+
args = ARGV[2..(ARGV.length-2)]
|
56
|
+
else
|
57
|
+
case task
|
58
|
+
when 'rake'
|
59
|
+
cmd_task = 'rake'
|
60
|
+
when 'drush'
|
61
|
+
cmd_task = 'vendor/drush/drush'
|
62
|
+
when 'sake'
|
63
|
+
cmd_task = 'public/framework/sake'
|
64
|
+
end
|
65
|
+
args = ARGV[1..(ARGV.length-2)]
|
66
|
+
end
|
67
|
+
|
68
|
+
# build command
|
69
|
+
run = "\"run[#{cmd_task} #{args.join(' ')}]\""
|
70
|
+
|
71
|
+
# do it!
|
72
|
+
exec "export to=#{environment} && bundle exec mina -f .bonethug/deploy.rb #{run} --verbose"
|
73
|
+
|
74
|
+
when 'deploy',
|
75
|
+
'setup',
|
76
|
+
'remote-backup',
|
77
|
+
'local-backup',
|
78
|
+
'sync-backup-to',
|
79
|
+
'sync-backup-from',
|
80
|
+
'sync-local-to',
|
81
|
+
'sync-local-from',
|
82
|
+
'init-db',
|
83
|
+
'force-unlock',
|
84
|
+
'cleanup'
|
45
85
|
|
46
86
|
# handle args
|
47
87
|
environment = ARGV[1]
|
@@ -66,7 +106,7 @@ module Bonethug
|
|
66
106
|
when 'force-unlock'
|
67
107
|
exec "export to=#{environment} && bundle exec mina -f .bonethug/deploy.rb deploy:force_unlock --verbose"
|
68
108
|
when 'cleanup'
|
69
|
-
exec "export to=#{environment} && bundle exec mina -f .bonethug/deploy.rb deploy:cleanup --verbose"
|
109
|
+
exec "export to=#{environment} && bundle exec mina -f .bonethug/deploy.rb deploy:cleanup --verbose"
|
70
110
|
|
71
111
|
# Snapshot Backup
|
72
112
|
when 'remote-backup'
|
data/lib/bonethug/installer.rb
CHANGED
@@ -233,10 +233,15 @@ module Bonethug
|
|
233
233
|
if project_type
|
234
234
|
bonethug_files = @@conf.get 'project_types.' + project_type + '.bonethug_files'
|
235
235
|
bonethug_files.each do |index, file|
|
236
|
+
|
237
|
+
# push some output
|
236
238
|
puts 'Handling ' + index.to_s + ':' + file.to_s
|
239
|
+
|
240
|
+
# do the copy
|
237
241
|
src_file = @@bonthug_gem_dir + '/skel/project_types/' + project_type + '/' + file
|
238
242
|
dst_file = target + '/' + file
|
239
243
|
FileUtils.cp src_file, dst_file
|
244
|
+
|
240
245
|
end
|
241
246
|
else
|
242
247
|
puts "Couldn't find project type in " + target_cnf
|
data/lib/bonethug/version.rb
CHANGED