You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
676 B
Bash

3 years ago
#!/bin/bash
# Directory for to build the release into
3 years ago
mkdir -p release
3 years ago
# Clone fresh copy of picc
if [[ ! -d "picc" ]]; then
git clone http://git.raptorpond.com/picc/picc.git
else
echo "picc already cloned."
fi
cd picc || exit
git pull
# Fetch rebar
if [[ ! -f "rebar3" ]]; then
curl -LO https://s3.amazonaws.com/rebar3/rebar3
fi
cd ..
# Build picc in a fresh alpine container and deposit the build into /release/
cat <<EOF | docker run --rm -i \
-v "$PWD"/picc:/picc \
-v "$PWD"/release:/release \
alpine:3.15 \
/bin/sh
apk update
apk add erlang-dev
cd /picc
./rebar3 as docker release -o ../release
EOF
docker build -t docker.raptorpond.com/picc .