mswin-build 1.3.1 → 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fa9c0789a580d68abf67f28ba90ca123e4d3a70ed12adbe03aabe8acec81e10
4
- data.tar.gz: 589affa876a69a9dfd0585c0a251d56bd6e197551ec0f3a668bc67dc8a4bd2b2
3
+ metadata.gz: 2fed59177b86648df08cfaed325f177df4788bfe563e30e7b9765703ee191b7a
4
+ data.tar.gz: 9454943763808038cfd0e84ccb149cee9de8a4b3adaaa3cdab176a6ca7402939
5
5
  SHA512:
6
- metadata.gz: 274bb7f67dbecd4a94e8bf261e17d2c99a1025604aee2f2ef2caa81bf44cd19d140690569eb44c5e7d9df470ed96bf3a316d19b21d29c5898c76b3314fff5643
7
- data.tar.gz: ed43023e96d1897d64fac50d27da6c8898ce21aa6f85e7eb5d671625e91fb7c9f4081d24344497250c5822f1ce021a6e526b7414b509df0b1cc2533e99ccaf77
6
+ metadata.gz: c3ddaa5bbb882dc87f5696aa2a5051eb824f28eeb5a2ec9babcd684dd2688cb1ecf1b6c2a59408b8c1df00bfbd983ed427a72afab1279aa937fc3576ee9ef63c
7
+ data.tar.gz: 45343b1e3d50fedb564a5dbc48a10587a21aabad0ffd8e3032893c7e8431890fe82d53b5ee986940d9947b96b239a9013e96d66cf00448422dc4cf8bc55994b7
@@ -52,6 +52,7 @@ module MswinBuild
52
52
  @config["timeout"]["svn/ruby"] ||= @config["timeout"]["default"]
53
53
  @config["timeout"]["svn/info"] ||= @config["timeout"]["default_short"]
54
54
  @config["timeout"]["git/ruby"] ||= @config["timeout"]["default"]
55
+ @config["timeout"]["git/info"] ||= @config["timeout"]["default_short"]
55
56
  @config["timeout"]["configure"] ||= @config["timeout"]["default"]
56
57
  @config["timeout"]["cc-version"] ||= @config["timeout"]["default_short"]
57
58
  @config["timeout"]["miniruby"] ||= @config["timeout"]["default"]
@@ -365,6 +366,16 @@ module MswinBuild
365
366
  Dir.chdir(tmpdir) do
366
367
  do_command(io, "git/ruby", "#{@config['git']} clone -q --branch #{@config['branch']} --depth 1 --single-branch #{@config['repository']} ruby")
367
368
  end
369
+ @data[:svn_url] = "https://github.com/ruby/ruby"
370
+
371
+ # git-info/ruby
372
+ Dir.chdir(File.join(tmpdir, "ruby")) do
373
+ do_command(io, "git-info/ruby", "#{@config['git']} log -1 2> NUL", true) do |s|
374
+ if /^commit ([\da-f]+)$/ =~ s
375
+ @data[:commit_hash] = $1
376
+ end
377
+ end
378
+ end
368
379
  else
369
380
  # svn/ruby
370
381
  Dir.chdir(tmpdir) do
@@ -623,7 +634,7 @@ module MswinBuild
623
634
  line = h(line) unless /^<a / =~ line
624
635
  out.write line
625
636
  warns += line.scan(/warn/i).length
626
- if File.basename(io.path) == "checkout" && /^(?:SVN )?Last Changed Rev: (\d+)$/ =~ line
637
+ if !@is_git && File.basename(io.path) == "checkout" && /^(?:SVN )?Last Changed Rev: (\d+)$/ =~ line
627
638
  revision = $1
628
639
  end
629
640
  end
@@ -665,12 +676,21 @@ module MswinBuild
665
676
  title << @data[:warn]
666
677
  end
667
678
  url = @data.delete(:svn_url)
668
- if revision
669
- @data[:ruby_rev] = "r#{revision}"
679
+ commit_hash = @data.delete(:commit_hash)
680
+ if revision || commit_hash
681
+ if @is_git
682
+ @data[:ruby_rev] = commit_hash[0, 11]
683
+ else
684
+ @data[:ruby_rev] = "r#{revision}"
685
+ end
670
686
  @title.unshift(@data[:ruby_rev])
671
687
  title.unshift(@data[:ruby_rev])
672
688
  @data[:version] = "#{@data[:ruby_rev]} #{@data[:version]}"
673
- @data[url] = revision
689
+ if @is_git
690
+ @data[url] = commit_hash
691
+ else
692
+ @data[url] = revision
693
+ end
674
694
  end
675
695
  @data.each_pair do |k, v|
676
696
  if k.is_a?(String) && /^failure_/ =~ k
@@ -1,3 +1,3 @@
1
1
  module MswinBuild
2
- VERSION = "1.3.1"
2
+ VERSION = "1.3.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mswin-build
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.1
4
+ version: 1.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - U.Nakamura