Skip to content
Browse files

Merge branch 'next'

Conflicts:
	config/rake.rb
  • Loading branch information...
2 parents 11bd6a3 + 53a4cff commit 23d1f8d7bac44a1fdf1032ed57a9538df6483055 @hollow hollow committed Feb 27, 2013
Showing with 19 additions and 20 deletions.
  1. +1 −1 config/rake.rb
  2. +18 −19 tasks/upstream.rake
View
2 config/rake.rb
@@ -19,7 +19,7 @@
SSL_EMAIL_ADDRESS = "hostmaster@example.com"
# The upstream branch to track
-UPSTREAM_BRANCH="master"
+UPSTREAM_BRANCH="zenops/master"
# cookbooks that should always be uploaded
FORCED_COOKBOOKS = %w(
View
37 tasks/upstream.rake
@@ -9,45 +9,44 @@ namespace :upstream do
sh("git push -u origin master")
end
- # add public cookbooks as upstream branch
+ # remove old cruft
sh("git remote rm upstream || :")
- sh("git remote add -f upstream https://github.com/zenops/cookbooks.git")
- sh("git branch -t -f upstream upstream/#{UPSTREAM_BRANCH}")
+ sh("git branch -D upstream || :")
+
+ # add public cookbooks remote
+ sh("git remote rm zenops || :")
+ sh("git remote add -f zenops https://github.com/zenops/cookbooks.git")
+ sh("git branch -t -f next zenops/next")
sh("git config push.default tracking")
end
task :pull do
require_clean_working_tree
- sh("git fetch upstream")
- sh("git branch -t -f upstream upstream/#{UPSTREAM_BRANCH}")
+ sh("git fetch zenops")
+ sh("git branch -t -f next zenops/next")
end
desc "Show changes to upstream"
task :changes => [ :pull ]
task :changes do
- sh("git diff --diff-filter=DMTUXB upstream master")
- end
-
- desc "Show new upstream commits"
- task :log => [ :pull ]
- task :log do
- sh("git log --reverse -p master..upstream")
+ sh("git diff --diff-filter=DMTUXB #{UPSTREAM_BRANCH} master")
end
desc "Merge upstream branch"
task :merge => [ :pull ]
task :merge do
- sh("git merge upstream")
+ sh("git merge #{UPSTREAM_BRANCH}")
end
- desc "Show missing picks from master"
- task :cherry do
- limit = %x(git show --oneline ":/^Merge branch 'upstream'").split($/).first.split(/\s/).first
- sh("git cherry -v upstream master #{limit} | grep -v ^-")
+ desc "Show missing picks from upstream"
+ task :cherry, :upstream do |t, args|
+ args.with_defaults(upstream: UPSTREAM_BRANCH)
+ limit = %x(git show --oneline ":/^Merge branch '#{args.upstream}'")
+ .split($/).first
+ .split(/\s/).first
+ sh("git cherry -v #{args.upstream} HEAD #{limit}")
end
-
end
task :uc => 'upstream:changes'
task :um => 'upstream:merge'
-task :cherry => 'upstream:cherry'

0 comments on commit 23d1f8d

Please sign in to comment.
Something went wrong with that request. Please try again.