socotra-build 0.0.10 → 0.1.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.
- checksums.yaml +4 -4
- data/lib/socotra-build.rb +1 -19
- data/lib/update.rb +21 -0
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e5862c2b702a2b16ea0ceebebd7b3233229015b9
|
|
4
|
+
data.tar.gz: 5e6e066a348b0937699049e46b50420714dd4bfc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3daedf43c6253403e1e9c0a82c6f03afaad5022881da6281a9f96ea543fc043525871057c04bf380b34220907bdf72be5f40ea17f19085cec5a24f3979640386
|
|
7
|
+
data.tar.gz: b98815816cbd993b3890fa657b88491a485c0c7415c47ffac8df770e6606c253cf33b51ac4b98bc95bc874102c6955b9f2a6c745ab20d3c29ed084ca0bce49be
|
data/lib/socotra-build.rb
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
1
|
require 'open3'
|
|
2
2
|
|
|
3
|
-
BEGIN {
|
|
4
|
-
version_to_install = ENV["SOCOTRA_BUILD_VERSION"]
|
|
5
|
-
output = `gem list |grep socotra-build`
|
|
6
|
-
version_installed = output.split('(')[1].split()[0].split(',')[0]
|
|
7
|
-
|
|
8
|
-
puts "version_to_install: #{version_to_install}"
|
|
9
|
-
puts "version_installed: #{version_installed}"
|
|
10
|
-
|
|
11
|
-
if not version_to_install.nil? and (version_installed != version_to_install)
|
|
12
|
-
output = `gem install socotra-build -v #{version_to_install}`
|
|
13
|
-
installed_socotra_build = `gem contents socotra-build`
|
|
14
|
-
load installed_socotra_build
|
|
15
|
-
reload!
|
|
16
|
-
else
|
|
17
|
-
puts "Not upgrading socotra-build"
|
|
18
|
-
end
|
|
19
|
-
}
|
|
20
|
-
|
|
21
3
|
def self.safe_retry(cmd, description, error_message="command failed", raise_on_fail=true, tries=3)
|
|
22
4
|
begin
|
|
23
5
|
status, output = system_safe(cmd, description, error_message, raise_on_fail=raise_on_fail, log_level="WARNING")
|
|
@@ -57,7 +39,7 @@ def self.system_safe(cmd, cmd_description, error_message, raise_on_fail=true, lo
|
|
|
57
39
|
return [status.success?, stdout]
|
|
58
40
|
end
|
|
59
41
|
|
|
60
|
-
def self.
|
|
42
|
+
def self.system_yarss()
|
|
61
43
|
puts "this shit is so safe"
|
|
62
44
|
end
|
|
63
45
|
|
data/lib/update.rb
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
BEGIN {
|
|
2
|
+
version_to_install = ENV["SOCOTRA_BUILD_VERSION"]
|
|
3
|
+
output = `gem list |grep socotra-build`
|
|
4
|
+
version_installed = output.split('(')[1].split()[0].split(',')[0]
|
|
5
|
+
|
|
6
|
+
puts "version_to_install: #{version_to_install}"
|
|
7
|
+
puts "version_installed: #{version_installed}"
|
|
8
|
+
|
|
9
|
+
if version_installed != version_to_install
|
|
10
|
+
system('gem install socotra-build -v #{version_to_install}')
|
|
11
|
+
files_in_module = `gem contents socotra-build`.split
|
|
12
|
+
files_in_module.each do |file|
|
|
13
|
+
unless file.include? "update.rb"
|
|
14
|
+
load file
|
|
15
|
+
reload!
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
else
|
|
19
|
+
puts "Not upgrading socotra-build"
|
|
20
|
+
end
|
|
21
|
+
}
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: socotra-build
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris Antenesse
|
|
@@ -17,6 +17,7 @@ extensions: []
|
|
|
17
17
|
extra_rdoc_files: []
|
|
18
18
|
files:
|
|
19
19
|
- lib/socotra-build.rb
|
|
20
|
+
- lib/update.rb
|
|
20
21
|
homepage: http://rubygems.org/gems/socotra
|
|
21
22
|
licenses:
|
|
22
23
|
- MIT
|