summaryrefslogtreecommitdiff
path: root/hooks/build
blob: 043be1f7bb9cd3e169fe8ca26ed4d57f82c9502b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash

VERSION=master

if [ "$SOURCE_BRANCH" != "" ]; then
    VERSION=$SOURCE_BRANCH

    if [ "$SOURCE_BRANCH" == "latest" ]; then
        VERSION=master
    fi
fi

echo "Building $VERSION"

docker build --build-arg VERSION=$VERSION -t $IMAGE_NAME .