8 tagForVersion=v${version}
10 ###############################################################################
12 declare -a repositories=(
13 "simantics/third-party.git" "third-party"
14 "simantics/platform.git" "platform"
15 "simantics/fmil.git" "fmil"
16 "simantics/interop.git" "interop"
17 "simantics/district.git" "district"
18 "simantics/matlab.git" "matlab"
19 "simantics/python.git" "python"
21 "simantics/sysdyn.git" "sysdyn"
22 "simantics/3d.git" "3d"
23 "members/fmi.git" "fmi"
24 "members/simupedia.git" "simupedia"
25 "gold-members/proteus.git" "simupedia"
28 repositoryCount=$((${#repositories[@]} / 2))
31 eval $1=\${repositories[$(($2 * 2))]}
35 eval $1=\${repositories[$(($2 * 2 + 1))]}
38 ###############################################################################
41 echo "[$(($1+1))/${repositoryCount}] $2"
45 echo "git clone ssh://${user}@www.simantics.org:29418/$1"
46 git clone ssh://${user}@www.simantics.org:29418/$1
55 echo "git fetch --all"
65 echo "git push origin $1"
70 echo "git checkout $1"
75 echo "git tag $1 -m \"Simantics $1 simultaneous release\""
76 git tag $1 -m "Simantics $1 simultaneous release"
85 echo "git push origin --tags"
86 git push origin --tags
97 function listBranches {
101 ###############################################################################
106 pushd $version > /dev/null
107 for (( i=0; i<${repositoryCount}; i++ )); do
117 pushd $version > /dev/null
120 for (( i=0; i<${repositoryCount}; i++ )); do
122 msg $i "Create $branch branch in $lp"
123 pushd $lp > /dev/null
129 for (( i=0; i<${repositoryCount}; i++ )); do
131 msg $i "Checkout $branch branch in $lp"
132 pushd $lp > /dev/null
138 for (( i=0; i<${repositoryCount}; i++ )); do
140 msg $i "Tag ${version} for $lp"
141 pushd $lp > /dev/null
148 for (( i=0; i<${repositoryCount}; i++ )); do
150 msg $i "List branches in $lp"
151 pushd $lp > /dev/null
157 for (( i=0; i<${repositoryCount}; i++ )); do
159 msg $i "List tags in $lp"
160 pushd $lp > /dev/null
166 for (( i=0; i<${repositoryCount}; i++ )); do
168 msg $i "Remove tag $tagForVersion from $lp"
169 pushd $lp > /dev/null
170 removeTag ${tagForVersion}
175 for (( i=0; i<${repositoryCount}; i++ )); do
177 msg $i "Fetch from remote origin in $lp"
178 pushd $lp > /dev/null
184 for (( i=0; i<${repositoryCount}; i++ )); do
186 msg $i "Pull from remote origin in $lp"
187 pushd $lp > /dev/null
193 for (( i=0; i<${repositoryCount}; i++ )); do
195 msg $i "Push branch $branch to remote origin in $lp"
196 pushd $lp > /dev/null
202 for (( i=0; i<${repositoryCount}; i++ )); do
204 msg $i "Push tags to remote origin in $lp"
205 pushd $lp > /dev/null
211 for (( i=0; i<${repositoryCount}; i++ )); do
213 msg $i "Status of $lp"
214 pushd $lp > /dev/null
220 echo "Usage: ${self} <version> <branch-name> <user-name> clone|branch|checkout|fetch|list-tags|pull|push|push-tags|remove-tag|status|tag"