1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Alias "master" and "trunk"

This commit is contained in:
Nobuyoshi Nakada 2019-07-01 23:16:47 +09:00
parent f2769ae2c9
commit 7ff2bfed92
No known key found for this signature in database
GPG key ID: 4BC7D6DF58D8DF60
2 changed files with 6 additions and 4 deletions

View file

@ -42,7 +42,7 @@ options:
-s3=PATH s3 bucket path(default=tmp)
-help, --help show this message
version:
trunk, stable, branches/*, tags/*, X.Y, X.Y.Z, X.Y.Z-pL
master, trunk, stable, branches/*, tags/*, X.Y, X.Y.Z, X.Y.Z-pL
each versions may be followed by optional @revision.
USAGE
end
@ -207,7 +207,7 @@ def package(vcs, rev, destdir, tmp = nil)
case rev
when nil
url = nil
when /\Atrunk\z/
when /\A(?:master|trunk)\z/
url = vcs.trunk
when /\Abranches\//
url = vcs.branch($')

View file

@ -326,6 +326,7 @@ class VCS
def trunk
url + "trunk"
end
alias master trunk
def branch_list(pat)
IO.popen(%W"#{COMMAND} ls #{branch('')}") do |f|
@ -507,9 +508,10 @@ class VCS
alias tag branch
def trunk
branch("trunk")
def master
branch("master")
end
alias trunk master
def stable
cmd = %W"#{COMMAND} for-each-ref --format=\%(refname:short) refs/heads/ruby_[0-9]*"