mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Fix a failure in bundle version with version outputs the version with build metadata
``` 1) bundle version with version outputs the version with build metadata Failure/Error: expect(out).to match(/\ABundler version #{Regexp.escape(Bundler::VERSION)} \(\d{4}-\d{2}-\d{2} commit #{COMMIT_HASH}\)\z/) expected "Bundler version 2.2.0.dev (2020-05-25 commit )" to match /\ABundler version 2\.2\.0\.dev \(\d{4}-\d{2}-\d{2} commit (?-mix:unknown|[a-fA-F0-9]{7,})\)\z/ Diff: @@ -1,2 +1,2 @@ -/\ABundler version 2\.2\.0\.dev \(\d{4}-\d{2}-\d{2} commit (?-mix:unknown|[a-fA-F0-9]{7,})\)\z/ +"Bundler version 2.2.0.dev (2020-05-25 commit )" Commands: $ /home/user/snapshot-master/ruby -I/home/user/snapshot-master/spec/bundler -r/home/user/snapshot-master/spec/bundler/support/artifice/fail.rb -r/home/user/snapshot-master/spec/bundler/support/hax.rb /home/user/snapshot-master/tmp/1/gems/system/bin/bundle version Bundler version 2.2.0.dev (2020-05-25 commit ) # $? => 0 ```
This commit is contained in:
parent
67d2a715ca
commit
fcc8be0198
1 changed files with 2 additions and 1 deletions
|
@ -329,9 +329,10 @@ module Spec
|
|||
|
||||
replace_version_file(version, dir: build_path) # rubocop:disable Style/HashSyntax
|
||||
|
||||
sys_exec("git rev-parse --short HEAD", :dir => source_root)
|
||||
build_metadata = {
|
||||
:built_at => loaded_gemspec.date.utc.strftime("%Y-%m-%d"),
|
||||
:git_commit_sha => sys_exec("git rev-parse --short HEAD", :dir => source_root).strip,
|
||||
:git_commit_sha => exitstatus.zero? ? out.strip : "unknown",
|
||||
}
|
||||
|
||||
replace_build_metadata(build_metadata, dir: build_path) # rubocop:disable Style/HashSyntax
|
||||
|
|
Loading…
Add table
Reference in a new issue