Updates for new CI

This commit is contained in:
mDuo13
2017-11-13 15:53:27 -08:00
parent 764236dd9f
commit 874b871422
5 changed files with 62 additions and 11 deletions

View File

@@ -1,11 +0,0 @@
general:
build_dir: ./
dependencies:
pre:
- pyenv global 3.4.0
override:
- pip3 install dactyl
test:
override:
- dactyl_build -s
- dactyl_link_checker

View File

@@ -117,6 +117,8 @@ targets:
- name: rippled-setup
display_name: rippled Setup Guide
link_subs:
"reference-rippled.html": https://ripple.com/build/rippled-apis/
pages:
# References are exhaustive lists of commands and options

38
tool/all-target-link-checker.sh Executable file
View File

@@ -0,0 +1,38 @@
#!/bin/bash
mkdir -p out
## One-liner syntax doesn't handle exit codes properly...
#./build.sh -lq | awk '{print "rm -r out/ && ./build.sh -t "$1" && ./check-links.sh"}' | xargs -0 bash -c
targets=`dactyl_build -lq | awk '{print $1}'`
linkerrors=0
builderrors=0
while read -r line; do
echo ""
echo "======================================="
echo "Checking Target: $line"
rm -r out
dactyl_build -sq -t "$line"
buildresult=$?
if [ $buildresult -eq 0 ]
then
dactyl_link_checker -q "$@"
linkerrors=$(($? + $linkerrors))
else
builderrors=$(($buildresult + $builderrors))
echo "Error building this target; skipping link checker."
fi
done <<< "$targets"
totalerrors=$(($builderrors + $linkerrors))
echo ""
echo "======================================="
echo "======================================="
echo "All-target summary:"
echo "$builderrors build errors"
echo "$linkerrors link errors"
echo "-----------------------------"
echo " $totalerrors total errors"
echo ""
exit $totalerrors

14
tool/conflictmarkers.sh Executable file
View File

@@ -0,0 +1,14 @@
#!/bin/bash
PATTERNS=('<<<<<<<' '>>>>>>>')
#not including ====== because that can be used for markdown h1 syntax
n=0
for p in ${PATTERNS[@]}; do
g=`grep -R $p content/* | grep -v '^Binary file .* matches$'`
if [[ ! -z $g ]]; then
echo "Git merge conflict marker $p found: $g"
n=1
fi
done
exit $n

8
tool/jenkins.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/bin/bash
# meant to be run from the root directory of the repo
set -e
tool/conflictmarkers.sh
tool/all-target-link-checker.sh