repo: add CI mode

This commit is contained in:
Thomas Hobson 2021-03-14 14:50:55 +13:00
parent d529384f21
commit be1b93cf1f
No known key found for this signature in database
GPG key ID: 9F1FD9D87950DB6F
3 changed files with 12 additions and 8 deletions

View file

@ -3,16 +3,27 @@ cd /piston/packages
SERVER=1
BUILD=1
ls -la /piston /piston/*
echo "Running through arguments.."
for pkg in "$@"
do
shift
if [[ "$pkg" = "--no-server" ]]; then
echo "Not starting index server after builds"
SERVER=0
elif [[ "$pkg" = "--no-build" ]]; then
echo "Building no more package"
BUILD=0
elif [[ "$pkg" = "--ci" ]]; then
echo "Running in CI mode, --no-build, --no-server"
BUILD=0
SERVER=0
for package in "$(git diff-tree --no-commit-id --name-only -r $1 | awk -F/ '{ print $2 "-" $3 }' | sort -u)"; do
make -j16 $package.pkg.tar.gz
done
else
if [[ $BUILD -eq 1 ]]; then
echo "Building package $pkg"