ruby-builder 0.1.1 → 0.1.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 55e8e52774db41de1561add195158d07150c400825249d86d0da73d6079c37a4
4
- data.tar.gz: 91c978274e1739b771a6cf8b480e2498d84aacd3ac25d431fe573ca395dfcb0a
3
+ metadata.gz: cd9809d518a15197b2d91e3be672266a77055c31a54b3619b7432153e922430d
4
+ data.tar.gz: 1c38bf7d4d16b8cb5e05be1f7ca9047d257ad7e9087f8e50de775948f41ba31b
5
5
  SHA512:
6
- metadata.gz: a72a783d468b381b40b43228f4894e82825a2b82120603199a82199dfcf5ad43505e23812128c842ffdc56295442588451249421cd7c190dc395d59a2b642c87
7
- data.tar.gz: e32d77f16737276618164572e4b83366648db28b2cde1732be2c7d3b60f5dc6f2eef51768385eafb4d323f93bf528a26900e2e8731f1ee15ff7e16f8acee1ab9
6
+ metadata.gz: 03b197c6bb7280ad38d3132f1ac32640c6a20de7f5200112fd8676480984613523af4da80a038b231fa7235a4a701eb0ffde47a09fc04268d1fc235800d62ec8
7
+ data.tar.gz: e165f39604271dbade67a63c7c99a100664bee5d749e25188bc84cf4d81feacfdcea02094cb7b7424d3e62a92f8d324a626f85b207403e220f68ac3011526bc9
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
1
  # CHANGELOG
2
+ ## v0.1.2
3
+
4
+ * Fix timestamp file removal bug in v0.1.1
5
+
2
6
  ## v0.1.1
3
7
 
4
8
  * Force updating revision in `ruby -v`
@@ -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, dir: source_dir)
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
- Dir.chdir(dir) do
37
- logger.info("+ #{command.shelljoin}")
38
- unless system(command.shelljoin)
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
 
@@ -1,5 +1,5 @@
1
1
  module Ruby
2
2
  module Builder
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun