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 "members/fmi.git" "fmi"
23 "members/simupedia.git" "simupedia"
26 repositoryCount=$((${#repositories[@]} / 2))
29 eval $1=\${repositories[$(($2 * 2))]}
33 eval $1=\${repositories[$(($2 * 2 + 1))]}
36 ###############################################################################
39 echo "[$(($1+1))/${repositoryCount}] $2"
43 echo "git clone ssh://${user}@www.simantics.org:29418/$1"
44 git clone ssh://${user}@www.simantics.org:29418/$1
53 echo "git fetch --all"
63 echo "git push origin $1"
68 echo "git checkout $1"
73 echo "git tag $1 -m \"Simantics $1 simultaneous release\""
74 git tag $1 -m "Simantics $1 simultaneous release"
83 echo "git push origin --tags"
84 git push origin --tags
95 function listBranches {
99 ###############################################################################
104 pushd $version > /dev/null
105 for (( i=0; i<${repositoryCount}; i++ )); do
115 pushd $version > /dev/null
118 for (( i=0; i<${repositoryCount}; i++ )); do
120 msg $i "Create $branch branch in $lp"
121 pushd $lp > /dev/null
127 for (( i=0; i<${repositoryCount}; i++ )); do
129 msg $i "Checkout $branch branch in $lp"
130 pushd $lp > /dev/null
136 for (( i=0; i<${repositoryCount}; i++ )); do
138 msg $i "Tag ${version} for $lp"
139 pushd $lp > /dev/null
146 for (( i=0; i<${repositoryCount}; i++ )); do
148 msg $i "List branches in $lp"
149 pushd $lp > /dev/null
155 for (( i=0; i<${repositoryCount}; i++ )); do
157 msg $i "List tags in $lp"
158 pushd $lp > /dev/null
164 for (( i=0; i<${repositoryCount}; i++ )); do
166 msg $i "Remove tag $tagForVersion from $lp"
167 pushd $lp > /dev/null
168 removeTag ${tagForVersion}
173 for (( i=0; i<${repositoryCount}; i++ )); do
175 msg $i "Fetch from remote origin in $lp"
176 pushd $lp > /dev/null
182 for (( i=0; i<${repositoryCount}; i++ )); do
184 msg $i "Pull from remote origin in $lp"
185 pushd $lp > /dev/null
191 for (( i=0; i<${repositoryCount}; i++ )); do
193 msg $i "Push branch $branch to remote origin in $lp"
194 pushd $lp > /dev/null
200 for (( i=0; i<${repositoryCount}; i++ )); do
202 msg $i "Push tags to remote origin in $lp"
203 pushd $lp > /dev/null
209 for (( i=0; i<${repositoryCount}; i++ )); do
211 msg $i "Status of $lp"
212 pushd $lp > /dev/null
218 echo "Usage: ${self} <version> <branch-name> <user-name> clone|branch|checkout|fetch|list-tags|pull|push|push-tags|remove-tag|status|tag"