ruby-builder 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/ruby/builder/ruby_builder.rb +15 -6
- data/lib/ruby/builder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd9809d518a15197b2d91e3be672266a77055c31a54b3619b7432153e922430d
|
4
|
+
data.tar.gz: 1c38bf7d4d16b8cb5e05be1f7ca9047d257ad7e9087f8e50de775948f41ba31b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 03b197c6bb7280ad38d3132f1ac32640c6a20de7f5200112fd8676480984613523af4da80a038b231fa7235a4a701eb0ffde47a09fc04268d1fc235800d62ec8
|
7
|
+
data.tar.gz: e165f39604271dbade67a63c7c99a100664bee5d749e25188bc84cf4d81feacfdcea02094cb7b7424d3e62a92f8d324a626f85b207403e220f68ac3011526bc9
|
data/CHANGELOG.md
CHANGED
@@ -12,7 +12,7 @@ module Ruby
|
|
12
12
|
# @param [String] build_dir
|
13
13
|
# @param [String] install_dir
|
14
14
|
def build(revision, source_dir:, build_dir:, install_dir:)
|
15
|
-
execute('git', 'checkout', revision.git
|
15
|
+
execute('git', '-C', source_dir, 'checkout', revision.git)
|
16
16
|
unless File.executable?(File.join(source_dir, 'configure'))
|
17
17
|
execute('autoreconf', dir: source_dir)
|
18
18
|
end
|
@@ -32,12 +32,21 @@ module Ruby
|
|
32
32
|
|
33
33
|
# @param [Array<String>] command
|
34
34
|
# @param [String] dir
|
35
|
-
def execute(*command, dir:)
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
raise BuildFailure.new("Failed to execute '#{command.shelljoin}' at '#{dir}' (exit status: #{$?.exitstatus})")
|
35
|
+
def execute(*command, dir: nil)
|
36
|
+
if dir
|
37
|
+
Dir.chdir(dir) do
|
38
|
+
assert_execute(*command)
|
40
39
|
end
|
40
|
+
else
|
41
|
+
assert_execute(*command)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
# @param [Array<String>] command
|
46
|
+
def assert_execute(*command)
|
47
|
+
logger.info("+ #{command.shelljoin}")
|
48
|
+
unless system(command.shelljoin)
|
49
|
+
raise BuildFailure.new("Failed to execute '#{command.shelljoin}' at '#{dir}' (exit status: #{$?.exitstatus})")
|
41
50
|
end
|
42
51
|
end
|
43
52
|
|
data/lib/ruby/builder/version.rb
CHANGED