From 2e44a38a8702f7fdad4ed77467e206c23f5d3674 Mon Sep 17 00:00:00 2001 From: casjay Date: Wed, 12 Oct 2022 17:25:02 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 2 +- bin/entrypoint-deno.sh | 2 +- bin/get-deno.sh | 18 +++++++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/Dockerfile b/Dockerfile index 51b7c7f..3cb8925 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM casjaysdevdocker/debian:latest as build -ENV VERSION="v1.23.3" \ +ENV DENO_VERSION="v1.26.1" \ DEBIAN_FRONTEND=noninteractive RUN apt update && \ diff --git a/bin/entrypoint-deno.sh b/bin/entrypoint-deno.sh index 621c532..a9d6a70 100755 --- a/bin/entrypoint-deno.sh +++ b/bin/entrypoint-deno.sh @@ -73,7 +73,7 @@ deno) if [ "$FRESH_INSTALL" = "true" ]; then deno --allow-all task start else - deno run --allow-all "${@:-/data/sample.ts}" + deno run --watch --allow-all "${@:-/data/sample.ts}" fi ;; esac diff --git a/bin/get-deno.sh b/bin/get-deno.sh index 6950869..ba688fe 100755 --- a/bin/get-deno.sh +++ b/bin/get-deno.sh @@ -16,13 +16,14 @@ # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Set bash options [ -n "$DEBUG" ] && set -x -set -o pipefail +# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +DENO_VERSION="${DENO_VERSION:-v1.26.1}" # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # AMD64 binary if [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "x86_64" ]; then ARCH=x86_64 - echo "grabbing ${VERSION}/deno-x86_64-unknown-linux-gnu.zip from denoland for $ARCH" - curl -Lsf "https://github.com/denoland/deno/releases/download/${VERSION}/deno-x86_64-unknown-linux-gnu.zip" -o "/tmp/deno-$ARCH.zip" && + echo "grabbing ${DENO_VERSION}/deno-x86_64-unknown-linux-gnu.zip from denoland for $ARCH" + curl -Lsf "https://github.com/denoland/deno/releases/download/${DENO_VERSION}/deno-x86_64-unknown-linux-gnu.zip" -o "/tmp/deno-$ARCH.zip" && if [ -f "/tmp/deno-$ARCH.zip" ]; then mkdir -p "/tmp/deno-$ARCH" && cd "/tmp/deno-$ARCH" || exit 10 unzip "/tmp/deno-$ARCH.zip" @@ -31,14 +32,15 @@ if [ "$(uname -m)" = "amd64" ] || [ "$(uname -m)" = "x86_64" ]; then rm -Rf "/tmp/deno-$ARCH.zip" "/tmp/deno-$ARCH" fi else - true + echo "Failed to download deno" + exit 2 fi # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # ARM64 binary if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then ARCH=arm64 - echo "grabbing ${VERSION}/deno-linux-arm64.zip from LukeChannings for $ARCH" - curl -Lsf "https://github.com/LukeChannings/deno-arm64/releases/download/${VERSION}/deno-linux-arm64.zip" -o "/tmp/deno-$ARCH.zip" && + echo "grabbing ${DENO_VERSION}/deno-linux-arm64.zip from LukeChannings for $ARCH" + curl -Lsf "https://github.com/LukeChannings/deno-arm64/releases/download/${DENO_VERSION}/deno-linux-arm64.zip" -o "/tmp/deno-$ARCH.zip" && if [ -f "/tmp/deno-$ARCH.zip" ]; then mkdir -p "/tmp/deno-$ARCH" && cd "/tmp/deno-$ARCH" || exit 10 unzip "/tmp/deno-$ARCH.zip" @@ -47,5 +49,7 @@ if [ "$(uname -m)" = "arm64" ] || [ "$(uname -m)" = "aarch64" ]; then rm -Rf "/tmp/deno-$ARCH.zip" "/tmp/deno-$ARCH" fi else - true + exit 2 fi +[ -f "$(which "deno")" ] && deno upgrade && exit 0 || exit 10 +