Last active
August 29, 2015 14:16
-
-
Save andersondias/90a0eb445e463a1a93d9 to your computer and use it in GitHub Desktop.
Revisions
-
andersondias revised this gist
Mar 11, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ #!/usr/bin/env ruby # usage: git-release branch-name-1 branch-name-2 origin/remote-branch-name-3 branchs = ARGV[0..-1] abort unless system("git checkout master") -
andersondias revised this gist
Mar 11, 2015 . 1 changed file with 7 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,15 @@ #!/usr/bin/env ruby branchs = ARGV[0..-1] abort unless system("git checkout master") abort unless system("git pull") abort unless system("git remote prune origin") system("gitk") print("Informe qual a tag que será usada nesse release: ") tag = STDIN.gets.chomp if branchs.size > 1 abort unless system("git checkout -b ad-release") branchs.each do |branch| -
andersondias created this gist
Mar 4, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ #!/usr/bin/env ruby branchs = ARGV[0..-2] tag = ARGV.last abort unless system("git checkout master") abort unless system("git pull") if branchs.size > 1 abort unless system("git checkout -b ad-release") branchs.each do |branch| abort unless system("git merge --no-edit --no-ff #{branch}") end abort unless system("git checkout master") abort unless system("git merge --no-edit --no-ff ad-release") abort unless system("git branch -d ad-release") else abort unless system("git merge --no-edit --no-ff #{branchs.first}") end abort unless system("git push") branchs.each do |branch| if branch.include?('origin/') abort unless system("git push origin :#{branch.gsub('origin/', '')}") else abort unless system("git branch -d #{branch}") abort unless system("git push origin :#{branch}") end end abort unless system("git tag #{tag}") abort unless system("git push --tags")