Skip to content

Commit

Permalink
feat: initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
xanmanning committed Mar 18, 2024
1 parent e484fad commit d04db22
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
21 changes: 19 additions & 2 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,29 @@ list_all_versions() {
}

download_release() {
local version filename url
local suffix version filename url platform arch
version="$1"
filename="$2"
platform="$3"
arch="$4"
suffix=""

case $platform in
"darwin")
suffix="-${platform}-${arch}"
;;
"windows")
suffix="-${platform}"
;;
*)
if [ "$platform" != "386" ] ; then
suffix="-${arch}"
fi
;;
esac

# TODO: Adapt the release URL convention for k3kcli
url="$GH_REPO/archive/v${version}.tar.gz"
url="${GH_REPO}/releases/download/v${version}/${TOOL_NAME}${suffix}"

echo "* Downloading $TOOL_NAME release $version..."
curl "${curl_opts[@]}" -o "$filename" -C - "$url" || fail "Could not download $url"
Expand Down
1 change: 1 addition & 0 deletions version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0

0 comments on commit d04db22

Please sign in to comment.