bonethug 0.0.62 → 0.0.63
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/config/deploy.rb +1 -1
- data/lib/bonethug/cli.rb +15 -3
- data/lib/bonethug/installer.rb +13 -7
- data/lib/bonethug/version.rb +2 -2
- data/lib/tasks/bonethug.rake +1 -1
- metadata +1 -1
data/config/deploy.rb
CHANGED
@@ -128,7 +128,7 @@ task :update_packages => :environment do
|
|
128
128
|
queue! %[php #{deploy_to}/current/public/framework/cli-script.php dev/build] if ['silverstripe','silverstripe3'].include? deploy.get('project_type')
|
129
129
|
end
|
130
130
|
|
131
|
-
desc "Sets up an
|
131
|
+
desc "Sets up an environment"
|
132
132
|
task :setup_env => :environment do
|
133
133
|
Bonethug::Installer.get_setup_env_cmds.each do |cmd|
|
134
134
|
queue! %[#{cmd}]
|
data/lib/bonethug/cli.rb
CHANGED
@@ -43,12 +43,24 @@ module Bonethug
|
|
43
43
|
return
|
44
44
|
end
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
46
|
+
# find the file
|
47
|
+
gem_dir = File.expand_path File.dirname(__FILE__) + '/../..'
|
48
|
+
script = gem_dir + '/scripts/ubuntu_setup.sh'
|
49
|
+
|
50
|
+
if env == 'show'
|
51
|
+
|
52
|
+
puts "Pre"
|
53
|
+
puts File.read script
|
54
|
+
|
55
|
+
puts "Parsed"
|
56
|
+
puts Installer.parse_sh File.read(script)
|
57
|
+
|
58
|
+
elsif env == 'local'
|
49
59
|
exec 'sudo bash ' + script
|
60
|
+
|
50
61
|
else
|
51
62
|
exec "export to=#{env} && bundle exec mina -f .bonethug/deploy.rb setup_env --verbose"
|
63
|
+
|
52
64
|
end
|
53
65
|
|
54
66
|
when 'init', 'update'
|
data/lib/bonethug/installer.rb
CHANGED
@@ -130,14 +130,20 @@ module Bonethug
|
|
130
130
|
self
|
131
131
|
end
|
132
132
|
|
133
|
+
def self.get_setup_script
|
134
|
+
@@bonthug_gem_dir + '/scripts/ubuntu_setup.sh'
|
135
|
+
end
|
136
|
+
|
137
|
+
def self.get_setup_script_content
|
138
|
+
File.read self.get_setup_script
|
139
|
+
end
|
140
|
+
|
133
141
|
def self.get_setup_env_cmds
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
true
|
140
|
-
}
|
142
|
+
self.parse_sh self.get_setup_script_content
|
143
|
+
end
|
144
|
+
|
145
|
+
def self.parse_sh(content)
|
146
|
+
content.split("\n").select { |line| !(line =~ /^[\s\t]+$/ || line =~ /^[\s\t]*#/ || line.strip.length == 0) }
|
141
147
|
end
|
142
148
|
|
143
149
|
protected
|
data/lib/bonethug/version.rb
CHANGED
data/lib/tasks/bonethug.rake
CHANGED
@@ -45,7 +45,7 @@ namespace :thug do
|
|
45
45
|
update_version_file
|
46
46
|
|
47
47
|
# invoke the build script
|
48
|
-
system 'git commit -am "commit to build for v
|
48
|
+
system 'git commit -am "commit to build for v ' + Bonethug::VERSION + '" && rake build'
|
49
49
|
|
50
50
|
end
|
51
51
|
|