26 lines
433 B
Text
26 lines
433 B
Text
|
|
#!/bin/sh -eu
|
||
|
|
|
||
|
|
: "${DOCKER_BIN:=docker}"
|
||
|
|
|
||
|
|
cd "$RUN_DIR"
|
||
|
|
|
||
|
|
builddir=build
|
||
|
|
|
||
|
|
[ -z "${DEBUG:-}" ] || set -x
|
||
|
|
|
||
|
|
mkdir -p "$builddir"
|
||
|
|
|
||
|
|
poetry export \
|
||
|
|
--with=build \
|
||
|
|
--output="$builddir"/requirements.txt
|
||
|
|
|
||
|
|
githash=$(git rev-parse --short HEAD)
|
||
|
|
today=$(date -u '+%Y.%m.%d')
|
||
|
|
version="${today}+${githash}"
|
||
|
|
echo "$version" >"$builddir"/version
|
||
|
|
|
||
|
|
$DOCKER_BIN build \
|
||
|
|
--pull \
|
||
|
|
--tag "code.dumpr.org/ducklet/unwind":"$version" \
|
||
|
|
.
|