rebuild.sh 747 Bytes
Newer Older
1 2
#!/bin/sh

3 4
set -e

5 6
/usr/bin/env

7 8
BASE=""
LATE=""
9

10
export REVISION=$(git log --pretty=format:'%h' -n 1)
11
CHANGED=$(for i in `git log --name-only --pretty=oneline --full-index $GIT_PREVIOUS_COMMIT..$GIT_COMMIT | grep -vE '^[0-9a-f]{40} '`; do echo `dirname $i`; done | sort | uniq)
12

13 14 15 16 17
for dir in $CHANGED; do
    case $dir in
        videolan-base*)
            BASE="$BASE $dir"
            ;;
18 19
        .)
            ;;
20 21 22 23 24
        *)
            LATE="$LATE $dir"
            ;;
    esac
done
25

26 27
echo "Changed base images: '$BASE'"
echo "Changed late images: '$LATE'"
28

29
for b in $BASE; do
30
    [ -d "$b" ] || continue
31
    make -C $b build
32
    make -C $b push
33 34
done

35
for l in $LATE; do
36
    [ -d "$l" ] || continue
37
    make -C $l build
38
    make -C $l push
39
done