Skip to content

Commit

Permalink
Merge pull request #69 from KanoComputing/update_branch
Browse files Browse the repository at this point in the history
Update: Permit `dr update` with a branch to use
  • Loading branch information
Ealdwulf authored Oct 21, 2016
2 parents 11e18a3 + 0440077 commit 7ba5cdf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/dr
Original file line number Diff line number Diff line change
Expand Up @@ -511,15 +511,18 @@ class RepoCLI < ExtendedThor
end

desc "update [SUITE]", "Update and rebuild (if necessary) all the packages in the suite"
method_option :branch, :aliases => "-b", :type => :string,
:desc => "Branch to use as the source for update"
def update(suite="testing")
log :info, "Updating all packages in the #{suite.fg "blue"} suite"
repo = get_repo_handle
branch = options["branch"] if options.has_key? "branch"

updated = 0
repo.list_packages(suite).each do |pkg|
log :info, "Updating #{pkg.name.style "pkg-name"}"
begin
version = pkg.build
version = pkg.build :branch => branch
rescue Dr::Package::UnableToBuild
log :info, ""
next
Expand Down

0 comments on commit 7ba5cdf

Please sign in to comment.