9-fetch: start using fetch

This commit is contained in:
rkiel
2017-10-07 09:56:56 -04:00
parent 657c88c14e
commit 941aed3389
8 changed files with 25 additions and 9 deletions

View File

@@ -17,7 +17,7 @@ module Release
validate_version_format version validate_version_format version
validate_current_branch_master validate_current_branch_master
git_pull current_branch git_fetch_and_merge current_branch
validate_version_is_new version validate_version_is_new version

View File

@@ -16,7 +16,7 @@ module Release
validate_current_branch_is_release validate_current_branch_is_release
git_pull release_branch git_fetch_and_merge release_branch
update_package_json version_from_release_branch(release_branch) update_package_json version_from_release_branch(release_branch)
@@ -25,7 +25,8 @@ module Release
git_push release_branch git_push release_branch
git_push_tags git_push_tags
git_checkout "master" git_checkout 'master'
git_fetch_and_merge current_branch
git_local_branch_delete release_branch git_local_branch_delete release_branch

View File

@@ -15,7 +15,7 @@ module Release
subcommand, version = *argv subcommand, version = *argv
validate_current_branch_master validate_current_branch_master
git_pull current_branch git_fetch_and_merge current_branch
git_checkout_track release_branch_from_version(version) git_checkout_track release_branch_from_version(version)
end end

View File

@@ -14,8 +14,9 @@ module Release
def execute def execute
validate_current_branch_is_release validate_current_branch_is_release
git_checkout "master" git_checkout 'master'
git_fetch_and_merge current_branch
git_local_branch_trash current_branch git_local_branch_trash current_branch
end end
end end

View File

@@ -13,8 +13,8 @@ module Release
def execute def execute
validate_current_branch_master validate_current_branch_master
git_pull current_branch git_fetch_and_merge current_branch
puts puts
puts show_existing_tags puts show_existing_tags
puts puts

View File

@@ -22,7 +22,7 @@ module Release
validate_version_format version validate_version_format version
validate_current_branch_master validate_current_branch_master
git_pull current_branch git_fetch_and_merge current_branch
validate_version_exists version validate_version_exists version

View File

@@ -25,6 +25,7 @@ module Release
validate_current_branch_is_release validate_current_branch_is_release
git_checkout 'master' git_checkout 'master'
git_fetch_and_merge current_branch
git_local_branch_trash release_branch git_local_branch_trash release_branch

View File

@@ -48,6 +48,19 @@ module Shared
run_cmd "git checkout #{branch}" run_cmd "git checkout #{branch}"
end end
def git_fetch
run_cmd "git fetch origin && git fetch origin --tags"
end
def git_remote_merge ( branch )
run_cmd "git merge origin/#{branch}"
end
def git_fetch_and_merge (branch)
git_fetch
git_remote_merge branch
end
def git_remote_branch_delete ( branch ) def git_remote_branch_delete ( branch )
run_cmd "git push origin :#{branch}" run_cmd "git push origin :#{branch}"
end end