This project is archived and is in readonly mode.
app template: allow plugins to specify branch or revision
Reported by Zack Hobson | March 26th, 2009 @ 07:24 PM | in 2.x
There is a plugin declaration in the application template runner that can specify either an SVN or git repo. In the case of git repos, it can also specify whether to clone or use a submodule. However, to specify a branch or revision, you have to add command-line params to the repository spec:
add stable branch as a git submodule
plugin 'x', :git => '-b stable git://github.com/x/x.git', :submodule => true
add stable branch as a git clone
plugin 'x', :git => '-r stable git://github.com/x/x.git'
add rev 1234 as a subversion working copy
plugin 'x', :svn => '-r 1234 svn://svn.rubyforge.org/x/trunk'
I've attached a patch that allows the user to specify a git branch or svn revision using options:
add stable branch as a git submodule
plugin 'x', :git => 'git://github.com/x/x.git', :submodule => true, :branch => 'stable'
add stable branch as a git clone
plugin 'x', :git => 'git://github.com/x/x.git', :branch => 'stable'
add rev 1234 as a subversion working copy
plugin 'x', :svn => 'svn://svn.rubyforge.org/x/trunk', :revision => 1234
Comments and changes to this ticket
-
CancelProfileIsBroken August 5th, 2009 @ 03:50 PM
- Tag changed from 2.3.2, 2.x, generator, git, patch, plugin, rg, subversion to 2.3.2, 2.x, bugmash, generator, git, patch, plugin, rg, subversion
-
José Valim August 8th, 2009 @ 02:04 PM
- Assigned user set to José Valim
-
David Trasbo August 8th, 2009 @ 05:20 PM
Patch does not apply to edge since railties/lib/rails_generator/generators/applications/app/template_runner.rb has been moved.
-
Matt Duncan August 8th, 2009 @ 10:24 PM
I re-created the patch based on master, Zach's attached patch still looks like it applies ok to 2-3-stable.
I've attached a patch.
-
José Valim August 8th, 2009 @ 11:30 PM
- State changed from new to resolved
- Tag changed from 2.3.2, 2.x, bugmash, generator, git, patch, plugin, rg, subversion to 2.3.2, 2.x, generator, git, patch, plugin, rg, subversion
-
Repository August 9th, 2009 @ 05:18 AM
(from [bee3e099bd3f4038f8a4122ad48446a232cbf21a]) Users can now pass :branch for git plugins and :revision for subversion plugins [#2352 status:resolved]
Signed-off-by: José Valim jose.valim@gmail.com
http://github.com/rails/rails/commit/bee3e099bd3f4038f8a4122ad48446...
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>
People watching this ticket
Attachments
Referenced by
- 2352 app template: allow plugins to specify branch or revision (from [bee3e099bd3f4038f8a4122ad48446a232cbf21a]) Users c...