-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtag.rb
executable file
·56 lines (46 loc) · 1.37 KB
/
tag.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env ruby -wKU
# encoding: utf-8
# Go to Jamoma root folder
rootfolder = "../"
Dir.chdir rootfolder
rootfolder = Dir.pwd
# Include the functions in the jamoma lib
require "#{rootfolder}/Core/Shared/jamomalib"
# Check Args
if(ARGV.length == 0)
puts "usage: "
puts "ruby tag.rb <required:tag-name> <optional:branch-to-tag>"
exit 0;
end
$tag = ARGV[0];
if(ARGV.length == 2)
$branch = ARGV[1];
else
$branch = "default";
end
# Define function to easily tag each sub modules
def tagModule relativePathFromJamomaFolder
if ($branch != "default")
puts "switching #{relativePathFromJamomaFolder} to #{$branch}"
`cd ./#{relativePathFromJamomaFolder}; git checkout #{$branch}`
end
puts "tagging #{relativePathFromJamomaFolder}"
`cd ./#{relativePathFromJamomaFolder}; git remote prune origin`
`cd ./#{relativePathFromJamomaFolder}; git tag #{$tag}`
`cd ./#{relativePathFromJamomaFolder}; git push origin --tags`
end
# Tag the Jamoma repository
`git remote prune origin`
`git tag #{$tag}`
`git push origin --tags`
# Tag each sub modules
tagModule "Core"
tagModule "Documentation"
tagModule "Implementations/AudioUnits"
tagModule "Implementations/iOS"
tagModule "Implementations/Max"
tagModule "Implementations/MaxDependencies"
tagModule "Implementations/MaxTest"
tagModule "Implementations/PureData"
tagModule "Implementations/Ruby"
tagModule "Implementations/VST"