I like automating things. ⚡
For setting up the dev-environment in PyCharm, we need to fork, clone and add upstream to each project.
From time to time, we need to update the forks.
Reference: Script for Syncing a Fork
I like automating things. ⚡
For setting up the dev-environment in PyCharm, we need to fork, clone and add upstream to each project.
From time to time, we need to update the forks.
Reference: Script for Syncing a Fork
#!/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 |