From 978dc659f882658f2b85b6171355498663daa6c0 Mon Sep 17 00:00:00 2001 From: Zack Hodgson Brady Date: Tue, 19 Dec 2023 21:24:04 -0500 Subject: [PATCH] updated hauler version and automated default version --- README.md | 2 +- install.sh | 8 +++----- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index c3228ec..ecce6a1 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ For more information, please review the **[Hauler Documentation](https://rancher curl -sfL https://get.hauler.dev | bash # install specific release -curl -sfL https://get.hauler.dev | HAULER_VERSION=0.4.1 bash +curl -sfL https://get.hauler.dev | HAULER_VERSION=0.4.2 bash ``` ### Windows diff --git a/install.sh b/install.sh index af03921..05fac39 100755 --- a/install.sh +++ b/install.sh @@ -9,7 +9,7 @@ # Install Latest Release # - curl -sfL https://get.hauler.dev | bash # Install Specific Release -# - curl -sfL https://get.hauler.dev | HAULER_VERSION=0.4.1 bash +# - curl -sfL https://get.hauler.dev | HAULER_VERSION=0.4.2 bash # Documentation: # - https://hauler.dev @@ -34,9 +34,7 @@ function fatal { } # check for required dependencies -dependencies=("curl" "awk" "openssl" "tar" "rm") - -for cmd in "${dependencies[@]}"; do +for cmd in curl sed awk openssl tar rm; do if ! command -v "$cmd" &> /dev/null; then fatal "$cmd is not installed" fi @@ -46,7 +44,7 @@ done info "Starting Installation..." # set version with an environment variable -version=${HAULER_VERSION:-0.4.1} +version=${HAULER_VERSION:-$(curl -s https://api.github.com/repos/rancherfederal/hauler/releases/latest | grep '"tag_name":' | sed 's/.*"v\([^"]*\)".*/\1/')} # set verision with an argument while [[ $# -gt 0 ]]; do