Skip to content

Instantly share code, notes, and snippets.

@gurneyalex
Created May 14, 2015 20:01
Show Gist options
  • Save gurneyalex/33dba5d8a12a73dbafec to your computer and use it in GitHub Desktop.
Save gurneyalex/33dba5d8a12a73dbafec to your computer and use it in GitHub Desktop.
OCA sudo commit script
#/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
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