Created
May 14, 2015 20:01
-
-
Save gurneyalex/33dba5d8a12a73dbafec to your computer and use it in GitHub Desktop.
OCA sudo commit script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
set -x | |
for repo in */ | |
do | |
pushd $repo | |
reponame=$(basename $repo) | |
echo $reponame | |
git fetch origin | |
for version in 6.1 7.0 8.0 | |
do | |
git reset --hard HEAD | |
git branch -D ${version} | |
if git checkout -q -B ${version} origin/${version} | |
then | |
if [[ -e .travis.yml ]] | |
then | |
sed -i -f ~/work/OCA/sudo.sed .travis.yml | |
git add .travis.yml | |
fi | |
git diff --cached | |
git commit -F ~/work/OCA/commit_message_sudo | |
git push origin | |
#git reset --hard HEAD~ | |
else | |
echo ${reponame}: no branch ${version} | |
fi | |
done | |
popd | |
done | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
s/sudo: required/addons:\n apt:\n packages:\n - expect-dev # provides unbuffer utility\n - python-lxml # because pip installation is slow\n/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment