Skip to content

Instantly share code, notes, and snippets.

@vchrombie
Last active March 17, 2020 08:29
Show Gist options
  • Save vchrombie/18cc5f36fe5c934067addf44a487ead9 to your computer and use it in GitHub Desktop.
Save vchrombie/18cc5f36fe5c934067addf44a487ead9 to your computer and use it in GitHub Desktop.
Scripts for maintaining GrimoireLab 🚀 🦉
#!/usr/bin/env bash
mkdir sources
cd sources/
repos=(
sirmordred
elk
kingarthur
graal
perceval
perceval-mozilla
perceval-opnfv
perceval-puppet
sortinghat
sigils
kidash
toolkit
cereslib
manuscripts
)
for i in ${!repos[@]}
do
echo -e `expr $i + 1` "\n>>> cloning ${repos[i]}"
git clone https://github.com/vchrombie/grimoirelab-"${repos[i]}"
echo -e "\n>>> adding remote"
cd grimoirelab-"${repos[i]}"
git remote -v
git remote add upstream https://github.com/chaoss/grimoirelab-"${repos[i]}"
echo -e "\n>>> remote added"
git remote -v
echo
cd ..
done
echo -e `expr 14 + 1` "\n>>> cloning perceval-finos"
git clone https://github.com/vchrombie/grimoirelab-perceval-finos
echo -e "\n>>> adding remote"
cd grimoirelab-perceval-finos
git remote -v
git remote add upstream https://github.com/Bitergia/grimoirelab-perceval-finos
echo -e "\n>>> remote added"
git remote -v
echo
cd ..
ls
echo
cd ..
ls
#!/usr/bin/env bash
cd sources/
repos=(
sirmordred
elk
kingarthur
graal
perceval
perceval-mozilla
perceval-opnfv
perceval-puppet
perceval-finos
sortinghat
sigils
kidash
toolkit
cereslib
manuscripts
)
for i in ${!repos[@]}
do
echo -e `expr $i + 1` "\n>>> opening repo"
cd grimoirelab-"${repos[i]}"
echo -e "\n>>> checking remote"
git remote -v
echo -e "\n>>> checking for changes in upstream"
git fetch upstream
echo -e "\n>>> merging changes with master"
git merge upstream/master
echo -e "\n>>> git push"
git push https://username:password@github.com/vchrombie/grimoirelab-"${repos[i]}"
git pull
echo
cd ..
done
ls
echo
cd ..
ls
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment