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 |
#!/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 errexit |
||||||
set -o nounset |
set -o nounset |
||||||
|
|
||||||
|
: ${SOURCE_DIR:="."} |
||||||
|
: ${DIST_DIR:="${SOURCE_DIR}/dist"} |
||||||
|
: ${BUILD_DIR:="/tmp/build"} |
||||||
|
|
||||||
# Build |
# Build |
||||||
cmake . |
cmake -B"${BUILD_DIR}" -H"${SOURCE_DIR}" |
||||||
|
|
||||||
|
pushd "${BUILD_DIR}" |
||||||
make clean |
make clean |
||||||
make |
make |
||||||
|
|
||||||
|
popd |
||||||
|
|
||||||
# Smoke tests (actual tests need Docker to run; they don't run within the CI environment) |
# 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 |
||||||
|
|
||||||
# Success |
echo "Testing $tini with: false" |
||||||
for tini in ./tini; do |
if $tini -vvvv false; then |
||||||
echo "Testing $tini with: true" |
exit 1 |
||||||
$tini -vvvv true |
fi |
||||||
|
|
||||||
echo "Testing $tini with: false" |
# Place files |
||||||
if $tini -vvvv false; then |
mkdir -p "${DIST_DIR}" |
||||||
exit 1 |
cp "${BUILD_DIR}"/tini "${DIST_DIR}" |
||||||
fi |
|
||||||
done |
|
||||||
|
Loading…
Reference in new issue