diff options
author | The Bundler Bot <bot@bundler.io> | 2017-07-17 16:40:38 +0000 |
---|---|---|
committer | The Bundler Bot <bot@bundler.io> | 2017-07-17 16:40:38 +0000 |
commit | 5bd0b4f273cd4a86c8630611aa01caec0f1a046b (patch) | |
tree | 1bb89a589d77b08fdc09f301bf510b9be6d2d360 | |
parent | 51a231ff204280547f04041afb36ea37b1bba490 (diff) | |
parent | 577c101bc40e11df10789d1865530ef78afbbf47 (diff) | |
download | bundler-5bd0b4f273cd4a86c8630611aa01caec0f1a046b.tar.gz |
Auto merge of #5867 - bundler:seg-release-patch-change-version-after-checkout, r=segiddins
[Rakefile] In a patch release, change version after checkout
### What was the end-user problem that led to this PR?
The problem was changes to the versions file on the `master` branch would cause checkout to fail
-rw-r--r-- | task/release.rake | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/task/release.rake b/task/release.rake index 8feaec3ae4..401842ba47 100644 --- a/task/release.rake +++ b/task/release.rake @@ -68,6 +68,11 @@ namespace :release do end prs.compact! + BUNDLER_SPEC.version = version + + branch = version.split(".", 3)[0, 2].push("stable").join("-") + sh("git", "checkout", branch) + version_file = "lib/bundler/version.rb" version_contents = File.read(version_file) unless version_contents.sub!(/^(\s*VERSION = )"#{Gem::Version::VERSION_PATTERN}"/, "\\1#{version.to_s.dump}") @@ -75,11 +80,6 @@ namespace :release do end File.open(version_file, "w") {|f| f.write(version_contents) } - BUNDLER_SPEC.version = version - - branch = version.split(".", 3)[0, 2].push("stable").join("-") - sh("git", "checkout", branch) - commits = `git log --oneline origin/master --`.split("\n").map {|l| l.split(/\s/, 2) }.reverse commits.select! {|_sha, message| message =~ /(Auto merge of|Merge pull request) ##{Regexp.union(*prs)}/ } |