mirror of https://github.com/krallin/tini.git
parent
84475c399b
commit
178f46aa01
6 changed files with 30 additions and 28 deletions
@ -1,22 +1,31 @@ |
||||
#!/bin/bash |
||||
# Should be run from the root dir (!) |
||||
# Should be run from the root dir, or SOURCE_DIR should be set. |
||||
set -o errexit |
||||
set -o nounset |
||||
|
||||
: ${SOURCE_DIR:="."} |
||||
: ${DIST_DIR:="${SOURCE_DIR}/dist"} |
||||
: ${BUILD_DIR:="/tmp/build"} |
||||
|
||||
# Build |
||||
cmake . |
||||
cmake -B"${BUILD_DIR}" -H"${SOURCE_DIR}" |
||||
|
||||
pushd "${BUILD_DIR}" |
||||
make clean |
||||
make |
||||
|
||||
# Smoke tests (actual tests need Docker to run; they don't run within the CI environment) |
||||
popd |
||||
|
||||
# Success |
||||
for tini in ./tini; do |
||||
echo "Testing $tini with: true" |
||||
$tini -vvvv true |
||||
# Smoke tests (actual tests need Docker to run; they don't run within the CI environment) |
||||
tini="${BUILD_DIR}/tini" |
||||
echo "Testing $tini with: true" |
||||
$tini -vvvv true |
||||
|
||||
echo "Testing $tini with: false" |
||||
if $tini -vvvv false; then |
||||
echo "Testing $tini with: false" |
||||
if $tini -vvvv false; then |
||||
exit 1 |
||||
fi |
||||
done |
||||
fi |
||||
|
||||
# Place files |
||||
mkdir -p "${DIST_DIR}" |
||||
cp "${BUILD_DIR}"/tini "${DIST_DIR}" |
||||
|
Loading…
Reference in new issue