speed up
This commit is contained in:
parent
df214e419a
commit
fc489fb780
51
gather.sh
51
gather.sh
@ -3,7 +3,32 @@
|
|||||||
apk update
|
apk update
|
||||||
apk add jq
|
apk add jq
|
||||||
|
|
||||||
for a in 2.0 2.0-upstream 2.0-fixed; do
|
## ADD REMOTE
|
||||||
|
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')
|
||||||
|
|
||||||
|
echo ${name}
|
||||||
|
echo ${url}
|
||||||
|
|
||||||
|
if [ $name != 'l10n-switzerland' ]
|
||||||
|
then
|
||||||
|
git remote add $name $url
|
||||||
|
git fetch $name
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
git gc --prune=now
|
||||||
|
done
|
||||||
|
|
||||||
|
for a in 2.0 1.0; do
|
||||||
|
echo "=========================================="
|
||||||
|
echo ${a}
|
||||||
git checkout ${a}
|
git checkout ${a}
|
||||||
for i in {1..3}; do
|
for i in {1..3}; do
|
||||||
repos=$(curl -s "https://gitlab.com/api/v4/groups/flectra-community/projects?per_page=100&page=${i}")
|
repos=$(curl -s "https://gitlab.com/api/v4/groups/flectra-community/projects?per_page=100&page=${i}")
|
||||||
@ -20,13 +45,31 @@ for a in 2.0 2.0-upstream 2.0-fixed; do
|
|||||||
|
|
||||||
if [ $name != 'l10n-switzerland' ]
|
if [ $name != 'l10n-switzerland' ]
|
||||||
then
|
then
|
||||||
git remote add $name $url
|
|
||||||
git fetch $name
|
|
||||||
git merge --no-edit --allow-unrelated-histories $name/${a}
|
git merge --no-edit --allow-unrelated-histories $name/${a}
|
||||||
git remote remove $name
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
git gc --prune=now
|
git gc --prune=now
|
||||||
done
|
done
|
||||||
|
|
||||||
|
## REMOVE
|
||||||
|
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')
|
||||||
|
|
||||||
|
echo ${name}
|
||||||
|
echo ${url}
|
||||||
|
|
||||||
|
if [ $name != 'l10n-switzerland' ]
|
||||||
|
then
|
||||||
|
git remote remove $name
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
git push --all
|
git push --all
|
Loading…
Reference in New Issue
Block a user