1: projects = [
2: 'project1',
3: 'project2'
4: ]
5:
6: tag = ARGV[0]
7:
8: puts "Tagging projects at #{tag}"
9:
10: def tag_project(tag, project)
11: Dir.chdir(project) do
12: system "git pull"
13: system "git tag #{tag}"
14: system "git push --tags"
15: end
16: end
17:
18: projects.each do |project|
19:
20: if !File.exists? project
21: system "git clone git@github.com:fork/#{project}.git"
22: end
23: tag_project tag, project
24: end
That's it!
No comments:
Post a Comment