2020-05-03 22:36:57 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2020-05-04 04:13:33 +08:00
|
|
|
set -eux
|
|
|
|
|
|
|
|
STAGE="${1-cmake}"
|
2020-05-03 22:36:57 +08:00
|
|
|
|
|
|
|
readarray -t FILES <<<"$(git ls-files | sed -e 's,^,c-toxcore/,')"
|
|
|
|
|
2020-05-04 04:13:33 +08:00
|
|
|
FILES+=(c-toxcore/.git)
|
|
|
|
|
2020-05-03 22:36:57 +08:00
|
|
|
if [ -f .git ]; then
|
2020-05-04 04:13:33 +08:00
|
|
|
FILES+=(.git/modules/c-toxcore)
|
2020-05-03 22:36:57 +08:00
|
|
|
fi
|
2020-05-04 04:13:33 +08:00
|
|
|
|
|
|
|
cd ..
|
|
|
|
tar -c "${FILES[@]}" |
|
|
|
|
docker build -f "c-toxcore/other/docker/travis/Dockerfile" \
|
|
|
|
-t localbuild/travis:1.0.0 -
|
|
|
|
tar -c "${FILES[@]}" |
|
|
|
|
docker build -f "c-toxcore/other/docker/$STAGE/Dockerfile" \
|
|
|
|
-t "localbuild/$STAGE:1.0.0" -
|