Sha256: 2bf4d4e8babfd3c275d8fcbbc85a3b78de4ff69fdcaf69a70b102bf34769ed38
Contents?: true
Size: 1.71 KB
Versions: 7
Compression:
Stored size: 1.71 KB
Contents
# -*- coding: UTF-8 -*- require 'build-tool/commands' require 'build-tool/recipe' require 'mj/vcs/git' module BuildTool; module Commands; module Recipes # # BuildCommand # class Incoming < Standard name "incoming" description "Show the incoming changes to the recipe from the repository." def applicable? BuildTool::Application.instance.has_recipe? end def initialize_options options.banner = "Usage: #{self.fullname} [OPTIONS]..." options.separator( "" ) options.separator( "Options" ) @rebase = false @fetch = false options.on( "-f", "--[no-]fetch", "Fetch from origin." ) { |t| @fetch = t } options.on( "-r", "--[no-]rebase", "Rebase against master." ) { |t| @rebase = t } super end def do_execute( args ) if ( args.length != 0 ) return usage("No arguments expected") end recipe = BuildTool::Application::instance.recipe repo = MJ::VCS::Git::Repository.new(recipe.global_path, $noop) branch = 'build-tool-%s' % BuildTool::VERSION.recipe_version() if @fetch info( "Fetching" ) repo.fetch("origin") end repo.log('HEAD..origin/%s' % branch ).each do |line| info( line ) end if @rebase info( "Rebasing" ) repo.rebase( branch, 'origin' ) end return 0 end end # class end; end # module Commands::Recipes end; # module BuildTool
Version data entries
7 entries across 7 versions & 1 rubygems