32 lines
1.1 KiB
Markdown
32 lines
1.1 KiB
Markdown
|
# Flectra Community Module Gather
|
||
|
|
||
|
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}
|
||
|
|
||
|
git remote add $name $url
|
||
|
git fetch $name
|
||
|
git checkout 2.0
|
||
|
git merge --no-edit --allow-unrelated-histories $name/2.0
|
||
|
git merge --no-edit --allow-unrelated-histories $name/2.0-fixed
|
||
|
git checkout 2.0-upstream
|
||
|
git merge --no-edit --allow-unrelated-histories $name/2.0-upstream
|
||
|
git checkout 1.0
|
||
|
git merge --no-edit --allow-unrelated-histories $name/1.0
|
||
|
git checkout 1.0-fixed
|
||
|
git merge --no-edit --allow-unrelated-histories $name/1.0-fixed
|
||
|
git checkout 1.0-upstream
|
||
|
git merge --no-edit --allow-unrelated-histories $name/1.0-upstream
|
||
|
git remote remove $name
|
||
|
git gc --prune=now
|
||
|
done
|
||
|
done
|