9-fetch: start using fetch
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -14,7 +14,8 @@ 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
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ 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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user