summaryrefslogtreecommitdiff
path: root/other/docker/run-ci
blob: a42c11eb199b7b53043058c464aa1e9a95133982 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash

set -eux

STAGE="${1-cmake}"

readarray -t FILES <<<"$(git ls-files | sed -e 's,^,c-toxcore/,')"

FILES+=(c-toxcore/.git)

if [ -f .git ]; then
  FILES+=(.git/modules/c-toxcore)
fi

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" -