Update scripts
- better clang-format handling, fix minor issues with deploy scriptmaster
parent
cb1b100728
commit
a91f411822
|
@ -9,7 +9,7 @@ AlignAfterOpenBracket: DontAlign
|
|||
#AlignConsecutiveDeclarations: false
|
||||
#AlignEscapedNewlines: Right
|
||||
AlignOperands: false
|
||||
AlignTrailingComments: false
|
||||
AlignTrailingComments: true
|
||||
AllowAllParametersOfDeclarationOnNextLine: false
|
||||
#AllowShortBlocksOnASingleLine: false
|
||||
AllowShortCaseLabelsOnASingleLine: true
|
||||
|
|
|
@ -9,13 +9,8 @@ if [ "$?" != 0 ]; then
|
|||
read -p "Do you want to automatically apply these changes (y/N)?" apply
|
||||
case $apply in
|
||||
y|Y)
|
||||
# Get the patch info from the message
|
||||
patch="$(PATCH_MODE=1 ./scripts/clang-format.sh)"
|
||||
MSG="$(cat $patch)"
|
||||
echo "$MSG" | git mailinfo --scissors /dev/null "$patch" &>/dev/null
|
||||
# And apply it to the staged changes.
|
||||
git apply --index "$patch"
|
||||
rm "$patch"
|
||||
# Get the patch info from the message and apply it to the staged changes.
|
||||
PATCH_MODE=1 ./scripts/clang-format.sh | git apply --index -
|
||||
;;
|
||||
*) exit 1;;
|
||||
esac
|
||||
|
|
|
@ -57,7 +57,7 @@ echo "Bundling output..."
|
|||
if [ "$BUILD_TYPE" == "mxe" ]; then
|
||||
zip -r "release/zip/pioneer-$TRAVIS_TAG-mxe.zip" release/* -x *release/zip*
|
||||
else
|
||||
tar -caf "release/zip/pioneer-$TRAVIS_TAG.tar.gz" --exclude release/zip release/*
|
||||
tar -czf "release/zip/pioneer-$TRAVIS_TAG.tar.gz" --exclude=release/zip release/*
|
||||
fi
|
||||
|
||||
echo "Release finished successfully!"
|
||||
|
|
|
@ -20,12 +20,18 @@ else
|
|||
GIT_DIFF_TOOL="git diff-index --cached"
|
||||
fi
|
||||
|
||||
FILES="$@"
|
||||
# Allow manually specifiying the files.
|
||||
if [ -z "$FILES" ]; then
|
||||
FILES=$($GIT_DIFF_TOOL --no-commit-id --name-only --diff-filter=d -r $RANGE | grep -v contrib/ | grep -E "\.(c|h|cpp|hpp|cc|hh|cxx|m|mm|inc)$")
|
||||
fi
|
||||
|
||||
if [ ! $PATCH_MODE ]; then echo -e "Checking files:\n$FILES"; fi
|
||||
if [ ! $PATCH_MODE ]; then
|
||||
echo -e "Checking files:"
|
||||
for file in $FILES; do
|
||||
echo -e "\t$file"
|
||||
done
|
||||
fi
|
||||
|
||||
prefix="static-check-clang-format"
|
||||
suffix="$(date +%s)"
|
||||
|
@ -38,7 +44,7 @@ else
|
|||
fi
|
||||
|
||||
for file in $FILES; do
|
||||
CLANG_MESSAGE=`"$CLANG_FORMAT" -style=file "$file"`
|
||||
CLANG_MESSAGE=$("$CLANG_FORMAT" -style=file "$file")
|
||||
|
||||
if [ "$?" = "0" ]; then
|
||||
diff $DIFF_COLOR -u "$file" - <<< "$CLANG_MESSAGE" | \
|
||||
|
@ -55,7 +61,8 @@ fi
|
|||
|
||||
if [ $PATCH_MODE ]; then
|
||||
# Print the filename of the generated patch.
|
||||
echo "$patch"
|
||||
cat "$patch"
|
||||
rm -f "$patch"
|
||||
exit 1
|
||||
else
|
||||
# a patch has been created, notify the user and exit
|
||||
|
|
Loading…
Reference in New Issue