mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Use the correct open command in the version bump rake task (#27046)
This commit is contained in:
parent
0258e985d8
commit
af6759f5e2
@ -103,13 +103,25 @@ end
|
|||||||
def make_pr(base:, branch:, title:)
|
def make_pr(base:, branch:, title:)
|
||||||
params = { expand: 1, title: title, body: <<~MD }
|
params = { expand: 1, title: title, body: <<~MD }
|
||||||
> :warning: This PR should not be merged via the GitHub web interface
|
> :warning: This PR should not be merged via the GitHub web interface
|
||||||
>
|
>
|
||||||
> It should only be merged (via fast-forward) using the associated `bin/rake version_bump:*` task.
|
> It should only be merged (via fast-forward) using the associated `bin/rake version_bump:*` task.
|
||||||
MD
|
MD
|
||||||
|
|
||||||
if !test_mode?
|
if !test_mode?
|
||||||
|
open_command =
|
||||||
|
case RbConfig::CONFIG["host_os"]
|
||||||
|
when /darwin|mac os/
|
||||||
|
"open"
|
||||||
|
when /linux|solaris|bsd/
|
||||||
|
"xdg-open"
|
||||||
|
when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
|
||||||
|
"start"
|
||||||
|
else
|
||||||
|
raise "Unsupported OS"
|
||||||
|
end
|
||||||
|
|
||||||
system(
|
system(
|
||||||
"open",
|
open_command,
|
||||||
"https://github.com/discourse/discourse/compare/#{base}...#{branch}?#{params.to_query}",
|
"https://github.com/discourse/discourse/compare/#{base}...#{branch}?#{params.to_query}",
|
||||||
exception: true,
|
exception: true,
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user