fix deb build

This commit is contained in:
John
2021-02-09 07:14:01 +01:00
parent 4f7e2eabfe
commit e2f8ae0ecb
2 changed files with 8 additions and 3 deletions
+1 -1
View File
@@ -13,7 +13,7 @@ ENV EBUSD_ARCH %EBUSD_ARCH%
ENV EBUSD_VERSION %EBUSD_VERSION%
RUN git clone https://github.com/john30/ebusd.git /build \
&& ./make_debian.sh
&& %EBUSD_MAKE%
%EBUSD_UPLOAD_LINES%
+7 -2
View File
@@ -19,22 +19,25 @@ function replaceTemplate () {
qemu_from_copy="COPY --from=qemu /usr/bin/qemu-$qemu-static /usr/bin/"
extra_rm=" /usr/bin/qemu-$qemu-static"
fi
file="${dir}Dockerfile${namesuffix}${suffix}"
sed \
-e "s#%QEMU_FROM_LINE%#${qemu_from_line}#g" \
-e "s#%BASE_IMAGE%#${prefix}${BASE_IMAGE:-$DEFAULT_IMAGE}#g" \
-e "s#%QEMU_FROM_COPY%#${qemu_from_copy}#g" \
-e "s#%EBUSD_MAKE%#${make}#g" \
-e "s#%EBUSD_VERSION%#${EBUSD_VERSION}#g" \
-e "s#%EBUSD_VERSION_VARIANT%#${version_variant}#g" \
-e "s#%EBUSD_ARCH%#${arch}#g" \
-e "s#%EXTRA_RM%#${extra_rm}#g" \
-e "s#%EBUSD_UPLOAD_LINES%#${upload_lines}#g" \
Dockerfile.template > "${dir}Dockerfile${namesuffix}${suffix}"
echo "updated ${dir}Dockerfile${suffix}"
Dockerfile.template > "$file"
echo "updated $file"
}
if [[ -z "$1" ]]; then
# devel updates
version_variant='-devel'
make='./make_debian.sh'
dir=''
upload_line=''
namesuffix=''
@@ -47,9 +50,11 @@ fi
version_variant=''
dir="$1"
if [[ -n "$1" ]]; then
make='./make_all.sh'
upload_lines='ARG UPLOAD_URL\nARG UPLOAD_CREDENTIALS\nARG UPLOAD_OS\nRUN if [ -n "\$UPLOAD_URL" ] \&\& [ -n "\$UPLOAD_CREDENTIALS" ]; then for img in ebusd-*.deb; do echo -n "upload \$img: "; curl -fs -u "\$UPLOAD_CREDENTIALS" -X POST --data-binary "@\$img" -H "Content-Type: application/octet-stream" "\$UPLOAD_URL/\$img?a=\$EBUSD_ARCH\&o=\$UPLOAD_OS\&v=\$EBUSD_VERSION" || echo "failed"; done; fi'
namesuffix=''
else
make='./make_debian.sh'
namesuffix='.release'
fi
for arch in $archs; do