Skip to content

Instantly share code, notes, and snippets.

@pmjones
Created September 5, 2014 14:44
Show Gist options
  • Save pmjones/7b9a44749c4b838ac475 to your computer and use it in GitHub Desktop.
Save pmjones/7b9a44749c4b838ac475 to your computer and use it in GitHub Desktop.
PACKAGE=$1
BASE=`pwd`
DIR="${BASE}/Aura.${PACKAGE}"
AUTH="${BASE}/Aura.Auth"
# change to package dir
cd $DIR
git pull
# fix .gitignore and .travis.yml
rm .gitignore
cp $AUTH/.travis.yml .
# fix autoload.php
cp $AUTH/autoload.php .
sed -i .bak "s/Auth'/${PACKAGE}'/" autoload.php
rm autoload.php.bak
# move unit tests to their own dir
cd tests
mkdir unit
git mv *.xml unit/
git mv *.php unit/
git mv src/ unit/
# add phpunit.sh, fix bootstrap.php
cd unit
cp $AUTH/tests/unit/phpunit.sh .
chmod +x phpunit.sh
git add phpunit.sh
cp $AUTH/tests/unit/bootstrap.php .
# back to package dir
cd $DIR
# config dir?
if [ -d config ]
then
cp $AUTH/.gitignore .
cp -r $AUTH/tests/container tests/
echo "Be sure to update the container tests."
fi
git diff .travis.yml
echo "Be sure to modify the README."
echo "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment