Skip to content

Commit

Permalink
merging PR #250: Prevent m̶a̶l̶i̶c̶i̶o̶u̶s̶ invalid code updates
Browse files Browse the repository at this point in the history
#250: Prevent m̶a̶l̶i̶c̶i̶o̶u̶s̶ invalid code updates 

Description:


:ok_woman: PR passed with a vote of 15 for and 1 against, with a weighted total of 14.0 and a threshold of 6.2.

Vote record:
@EtherTyper: 1
@JarJak: 1
@Mursaat: 1
@PlasmaPower: 1
@ad-m: 1
@chickenchuck040: 1
@dcstone09: 1
@ike709: 1
@kochmaxence: -1
@patricknelson: 1
@reddraggone9: 1
@rhengles: 1
@rudehn: 1
@sorcio: 1
@viktorsec: 1
@xyproto: 1
  • Loading branch information
chaosbot authored May 25, 2017
2 parents 551a379 + 17b0ad8 commit 56ade60
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
21 changes: 21 additions & 0 deletions startup.d/10-git-pull.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,23 @@
#!/bin/sh

# Prepare code auditing environment
REPO_URL=$(git remote get-url origin)
TEST_DIR=$(mktemp -d)
git clone "$REPO_URL" "$TEST_DIR";
pushd "$TEST_DIR";

# Code auditing section
find . -name '*.py' -print0 | xargs -0 python -m py_compile;
if [ "$?" != "0" ]
then
echo "There is syntax error. This may endanger chaos. Pauses updates."
rm -r -f "$TEST_DIR";
exit 45
fi

# End code auditing section
popd
rm -r -f "$TEST_DIR";

git checkout master
git pull
1 change: 1 addition & 0 deletions startup.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
cd "$(dirname "$0")"

for file in startup.d/*; do
[[ -f "$file" && -x "$file" ]] && "$file"
done

0 comments on commit 56ade60

Please # to comment.