Skip to content

Commit

Permalink
feat: add update.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
id committed Jan 2, 2024
1 parent 1572ca4 commit 2b64afc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -eou pipefail

VERSION="$1"
VERSION_DIR=$(echo "$VERSION" | cut -d '.' -f 1,2 -)

AMD64_SHA256=$(curl -sSL https://github.com/emqx/emqx/releases/download/v${VERSION}/emqx-${VERSION}-debian11-amd64.tar.gz.sha256)
ARM64_SHA256=$(curl -sSL https://github.com/emqx/emqx/releases/download/v${VERSION}/emqx-${VERSION}-debian11-arm64.tar.gz.sha256)

sed -i'' -e "s/EMQX_VERSION=.*/EMQX_VERSION=${VERSION}/" $VERSION_DIR/Dockerfile
sed -i'' -e "s/AMD64_SHA256=.*/AMD64_SHA256=${AMD64_SHA256}/" $VERSION_DIR/Dockerfile
sed -i'' -e "s/ARM64_SHA256=.*/ARM64_SHA256=${ARM64_SHA256}/" $VERSION_DIR/Dockerfile

0 comments on commit 2b64afc

Please sign in to comment.