add support for upload only

This commit is contained in:
john30
2021-01-17 19:14:51 +01:00
parent 76d7941a64
commit db11336d69
5 changed files with 7 additions and 2 deletions
+1
View File
@@ -17,6 +17,7 @@ RUN git clone https://github.com/john30/ebusd.git /build \
ARG UPLOAD_URL
ARG UPLOAD_CREDENTIALS
ARG UPLOAD_ONLY
+1
View File
@@ -17,6 +17,7 @@ RUN git clone https://github.com/john30/ebusd.git /build \
ARG UPLOAD_URL
ARG UPLOAD_CREDENTIALS
ARG UPLOAD_ONLY
+1
View File
@@ -17,6 +17,7 @@ RUN git clone https://github.com/john30/ebusd.git /build \
ARG UPLOAD_URL
ARG UPLOAD_CREDENTIALS
ARG UPLOAD_ONLY
%EBUSD_UPLOAD_LINE%
+2 -1
View File
@@ -17,7 +17,8 @@ RUN git clone https://github.com/john30/ebusd.git /build \
ARG UPLOAD_URL
ARG UPLOAD_CREDENTIALS
RUN if [ -n "$UPLOAD_URL" ] && [ -n "$UPLOAD_CREDENTIALS" ]; then for img in ebusd-*.deb; do echo "upload $img"; curl -u "$UPLOAD_CREDENTIALS" -s -X POST --data-binary "@$img" -H "Content-Type: application/octet-stream" "$UPLOAD_URL/$img?a=$EBUSD_ARCH&v=$EBUSD_VERSION"; done; fi
ARG UPLOAD_ONLY
RUN if [ -n "$UPLOAD_URL" ] && [ -n "$UPLOAD_CREDENTIALS" ]; then for img in ebusd-*.deb; do echo "upload $img"; curl -u "$UPLOAD_CREDENTIALS" -s -X POST --data-binary "@$img" -H "Content-Type: application/octet-stream" "$UPLOAD_URL/$img?a=$EBUSD_ARCH&v=$EBUSD_VERSION"; done; if [ -n "$UPLOAD_ONLY" ]; then echo "stopping for upload only"; exit 139; fi fi
FROM debian:stretch-slim
+2 -1
View File
@@ -46,7 +46,8 @@ done
version_variant=''
make='./make_all.sh'
dir='release/'
upload_line='RUN if [ -n "\$UPLOAD_URL" ] \&\& [ -n "\$UPLOAD_CREDENTIALS" ]; then for img in ebusd-*.deb; do echo "upload \$img"; curl -u "\$UPLOAD_CREDENTIALS" -s -X POST --data-binary "@\$img" -H "Content-Type: application/octet-stream" "\$UPLOAD_URL/\$img?a=\$EBUSD_ARCH\&v=\$EBUSD_VERSION"; done; fi'
upload_line='RUN if [ -n "\$UPLOAD_URL" ] \&\& [ -n "\$UPLOAD_CREDENTIALS" ]; then for img in ebusd-*.deb; do echo "upload \$img"; curl -u "\$UPLOAD_CREDENTIALS" -s -X POST --data-binary "@\$img" -H "Content-Type: application/octet-stream" "\$UPLOAD_URL/\$img?a=\$EBUSD_ARCH\&v=\$EBUSD_VERSION"; done; if [ -n "\$UPLOAD_ONLY" ]; then echo "stopping for upload only"; exit 139; fi fi'
for arch in $archs; do
replaceTemplate
done