Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Travis auto PEP8 cleanup by Persian Prince
- Loading branch information
1 parent
d846f1a
commit bd67fa6
Showing
3 changed files
with
107 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
#!/bin/sh | ||
|
||
echo "" | ||
echo "PEP8 double aggressive safe cleanup by Persian Prince" | ||
# Script by Persian Prince for https://github.com/OpenVisionE2 | ||
# You're not allowed to remove my copyright or reuse this script without putting this header. | ||
echo "" | ||
echo "Changing py files, please wait ..." | ||
begin=$(date +"%s") | ||
|
||
echo "" | ||
echo "PEP8 double aggressive E401" | ||
autopep8 . -a -a -j 0 --recursive --select=E401 --in-place | ||
git add -u | ||
git add * | ||
git commit -m "PEP8 double aggressive E401 (build $TRAVIS_BUILD_NUMBER)" | ||
|
||
echo "" | ||
echo "PEP8 double aggressive E701, E70 and E502" | ||
autopep8 . -a -a -j 0 --recursive --select=E701,E70,E502 --in-place | ||
git add -u | ||
git add * | ||
git commit -m "PEP8 double aggressive E701, E70 and E502 (build $TRAVIS_BUILD_NUMBER)" | ||
|
||
echo "" | ||
echo "PEP8 double aggressive E251 and E252" | ||
autopep8 . -a -a -j 0 --recursive --select=E251,E252 --in-place | ||
git add -u | ||
git add * | ||
git commit -m "PEP8 double aggressive E251 and E252 (build $TRAVIS_BUILD_NUMBER)" | ||
|
||
echo "" | ||
echo "PEP8 double aggressive E20 and E211" | ||
autopep8 . -a -a -j 0 --recursive --select=E20,E211 --in-place | ||
git add -u | ||
git add * | ||
git commit -m "PEP8 double aggressive E20 and E211 (build $TRAVIS_BUILD_NUMBER)" | ||
|
||
echo "" | ||
echo "PEP8 double aggressive E22, E224, E241, E242 and E27" | ||
autopep8 . -a -a -j 0 --recursive --select=E22,E224,E241,E242,E27 --in-place | ||
git add -u | ||
git add * | ||
git commit -m "PEP8 double aggressive E22, E224, E241, E242 and E27 (build $TRAVIS_BUILD_NUMBER)" | ||
|
||
echo "" | ||
echo "PEP8 double aggressive E225 ~ E228 and E231" | ||
autopep8 . -a -a -j 0 --recursive --select=E225,E226,E227,E228,E231 --in-place | ||
git add -u | ||
git add * | ||
git commit -m "PEP8 double aggressive E225 ~ E228 and E231 (build $TRAVIS_BUILD_NUMBER)" | ||
|
||
echo "" | ||
echo "PEP8 double aggressive E301 ~ E306" | ||
autopep8 . -a -a -j 0 --recursive --select=E301,E302,E303,E304,E305,E306 --in-place | ||
git add -u | ||
git add * | ||
git commit -m "PEP8 double aggressive E301 ~ E306 (build $TRAVIS_BUILD_NUMBER)" | ||
|
||
echo "" | ||
echo "PEP8 double aggressive W291 ~ W293 and W391" | ||
autopep8 . -a -a -j 0 --recursive --select=W291,W292,W293,W391 --in-place | ||
git add -u | ||
git add * | ||
git commit -m "PEP8 double aggressive W291 ~ W293 and W391 (build $TRAVIS_BUILD_NUMBER)" | ||
|
||
echo "" | ||
finish=$(date +"%s") | ||
timediff=$(($finish-$begin)) | ||
echo -e "Change time was $(($timediff / 60)) minutes and $(($timediff % 60)) seconds." | ||
echo -e "Fast changing would be less than 1 minute." | ||
echo "" | ||
echo "PEP8 Done!" | ||
echo "" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#!/bin/sh | ||
|
||
# Script by Persian Prince for https://github.com/OpenVisionE2 | ||
# You're not allowed to remove my copyright or reuse this script without putting this header. | ||
|
||
setup_git() { | ||
git config --global user.email "bot@openvision.tech" | ||
git config --global user.name "Open Vision python bot" | ||
} | ||
|
||
commit_files() { | ||
git clean -fd | ||
rm -rf *.pyc | ||
rm -rf *.pyo | ||
rm -rf *.mo | ||
git checkout develop | ||
./PEP8.sh | ||
} | ||
|
||
upload_files() { | ||
git remote add upstream https://${GH_TOKEN}@github.com/OpenVisionE2/enigma2-openvision.git > /dev/null 2>&1 | ||
git push --quiet upstream develop || echo "failed to push with error $?" | ||
} | ||
|
||
setup_git | ||
commit_files | ||
upload_files |