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" "proteus"
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 if [ -n "$version" ] && [ -d $version ]; then
118 pushd $version > /dev/null
123 for (( i=0; i<${repositoryCount}; i++ )); do
125 msg $i "Create $branch branch in $lp"
126 pushd $lp > /dev/null
132 for (( i=0; i<${repositoryCount}; i++ )); do
134 msg $i "Checkout $branch branch in $lp"
135 pushd $lp > /dev/null
141 for (( i=0; i<${repositoryCount}; i++ )); do
143 msg $i "Tag ${version} for $lp"
144 pushd $lp > /dev/null
151 for (( i=0; i<${repositoryCount}; i++ )); do
153 msg $i "List branches in $lp"
154 pushd $lp > /dev/null
160 for (( i=0; i<${repositoryCount}; i++ )); do
162 msg $i "List tags in $lp"
163 pushd $lp > /dev/null
169 for (( i=0; i<${repositoryCount}; i++ )); do
171 msg $i "Remove tag $tagForVersion from $lp"
172 pushd $lp > /dev/null
173 removeTag ${tagForVersion}
178 for (( i=0; i<${repositoryCount}; i++ )); do
180 msg $i "Fetch from remote origin in $lp"
181 pushd $lp > /dev/null
187 for (( i=0; i<${repositoryCount}; i++ )); do
189 msg $i "Pull from remote origin in $lp"
190 pushd $lp > /dev/null
196 for (( i=0; i<${repositoryCount}; i++ )); do
198 msg $i "Push branch $branch to remote origin in $lp"
199 pushd $lp > /dev/null
205 for (( i=0; i<${repositoryCount}; i++ )); do
207 msg $i "Push tags to remote origin in $lp"
208 pushd $lp > /dev/null
214 for (( i=0; i<${repositoryCount}; i++ )); do
216 msg $i "Status of $lp"
217 pushd $lp > /dev/null
223 echo "Usage: ${self} <version> <branch-name> <user-name> clone|branch|checkout|fetch|list-tags|pull|push|push-tags|remove-tag|status|tag"
224 if [ -d $version ]; then
225 echo "Version directory ('$version') does not exist yet. Please run the 'clone' action first."