2022-03-18 08:59:38 +00:00
|
|
|
# Flectra Community Module Gather
|
|
|
|
|
2022-03-18 16:56:02 +00:00
|
|
|
apk update
|
|
|
|
apk add jq
|
|
|
|
|
2022-03-19 14:00:02 +00:00
|
|
|
for a in 2.0 2.0-upstream 2.0-fixed; do
|
|
|
|
git checkout ${a}
|
|
|
|
for i in {1..3}; do
|
|
|
|
repos=$(curl -s "https://gitlab.com/api/v4/groups/flectra-community/projects?per_page=100&page=${i}")
|
|
|
|
git config --global merge.ours.driver true
|
|
|
|
for row in $(echo "${repos}" | jq -r '.[] | @base64'); do
|
|
|
|
_jq() {
|
|
|
|
echo ${row} | base64 --decode | jq -r ${1}
|
|
|
|
}
|
|
|
|
url=$(_jq '.http_url_to_repo')
|
|
|
|
name=$(_jq '.name')
|
2022-03-18 08:59:38 +00:00
|
|
|
|
2022-03-19 14:00:02 +00:00
|
|
|
echo ${name}
|
|
|
|
echo ${url}
|
2022-03-18 08:59:38 +00:00
|
|
|
|
2022-03-19 14:00:02 +00:00
|
|
|
if [ $name != 'l10n-switzerland' ]
|
|
|
|
then
|
|
|
|
git remote add $name $url
|
|
|
|
git fetch $name
|
|
|
|
git merge --no-edit --allow-unrelated-histories $name/${a}
|
|
|
|
git remote remove $name
|
|
|
|
fi
|
|
|
|
done
|
2022-03-18 08:59:38 +00:00
|
|
|
done
|
2022-03-19 14:00:02 +00:00
|
|
|
git gc --prune=now
|
2022-03-18 16:56:02 +00:00
|
|
|
done
|
|
|
|
git push --all
|