From 2da79c406a049dcc44fec2814dbc768218f04d7c Mon Sep 17 00:00:00 2001 From: robbiec Date: Thu, 15 Jan 2026 02:06:19 -0800 Subject: [PATCH] added script for installing latest release locally (directly from github) --- scripts/install-latest-release.sh | 35 +++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 scripts/install-latest-release.sh diff --git a/scripts/install-latest-release.sh b/scripts/install-latest-release.sh new file mode 100755 index 0000000..b1fb470 --- /dev/null +++ b/scripts/install-latest-release.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env sh + +set -e + +# install-latest-release.sh : install from releases on dashlane official github repo. + +export REPO='https://github.com/Dashlane/dashlane-cli.git' +export PLATFORM='linux-x64' +export OUTPUT_DIR="$HOME/standalone-apps" # NOTE: set to wherever you want +export RELEASE; + +get_latest_release_tag() { + gh release list \ + --repo "${REPO}" \ + --json name,tagName,isLatest | jq '.[0] | .tagName' +} + +download_release() { + echo -e "downloading the latest release (overwriting if exists)..." + local RELEASE="${1}" + local PATTERN="dcli-${PLATFORM}" + gh release download --clobber \ + --repo "${REPO}" \ + --pattern "${PATTERN}" \ + --dir "${OUTPUT_DIR}" \ + "${RELEASE}" + # ensure it's executable + chmod +x "${OUTPUT_DIR}/${PATTERN}" +} + +RELEASE="$(get_latest_release_tag)" + +download_release + +