27 lines
584 B
Bash
Executable file
27 lines
584 B
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
set -e;
|
|
|
|
if [[ -v FB_VERSION ]]; then
|
|
echo "Processing with version ${FB_VERSION}"
|
|
else
|
|
echo "Set FB_VERSION before calling this script"
|
|
exit 1;
|
|
fi
|
|
|
|
BUILD_DIR="build"
|
|
|
|
if [[ ! -d "${BUILD_DIR}" ]]; then
|
|
mkdir -p "${BUILD_DIR}";
|
|
echo "Created ${BUILD_DIR}"
|
|
else
|
|
rm -rf "${BUILD_DIR}";
|
|
mkdir -p "${BUILD_DIR}";
|
|
echo "Re-created ${BUILD_DIR}"
|
|
fi
|
|
|
|
git clone --branch ${FB_VERSION} https://github.com/Bluewind/filebin --depth=1 "${BUILD_DIR}";
|
|
sudo docker build --no-cache -t varakh/filebin:${FB_VERSION} -t varakh/filebin:latest .;
|
|
|
|
|
|
|