Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
joshkaplinsky committed Oct 5, 2023
1 parent cac8817 commit 853958b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,7 @@

# Dependencies

**TODO: adapt this section**

- `bash`, `curl`, `tar`: generic POSIX utilities.
- `SOME_ENV_VAR`: set this environment variable in your shell config to load the correct version of tool x.

# Install

Expand Down
29 changes: 13 additions & 16 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

set -euxo pipefail

# TODO: Ensure this is the correct GitHub homepage where releases can be downloaded for temporal.
GH_REPO="https://github.com/temporalio/cli"
TOOL_NAME="temporal"
TOOL_TEST="temporal --version"
Expand Down Expand Up @@ -31,28 +30,26 @@ list_github_tags() {
}

list_all_versions() {
# TODO: Adapt this. By default we simply list the tag names from GitHub releases.
# Change this function if temporal has other means of determining installable versions.
list_github_tags
}

get_arch() {
uname | tr '[:upper:]' '[:lower:]'
uname | tr '[:upper:]' '[:lower:]'
}

get_cpu() {
local machine_hardware_name
machine_hardware_name=${ASDF_TCTL_OVERWRITE_ARCH:-"$(uname -m)"}

case "$machine_hardware_name" in
'x86_64') local cpu_type="amd64";;
'powerpc64le' | 'ppc64le') local cpu_type="ppc64le";;
'aarch64') local cpu_type="arm64";;
'armv7l') local cpu_type="arm";;
*) local cpu_type="$machine_hardware_name";;
esac

echo "$cpu_type"
local machine_hardware_name
machine_hardware_name=${ASDF_TCTL_OVERWRITE_ARCH:-"$(uname -m)"}

case "$machine_hardware_name" in
'x86_64') local cpu_type="amd64" ;;
'powerpc64le' | 'ppc64le') local cpu_type="ppc64le" ;;
'aarch64') local cpu_type="arm64" ;;
'armv7l') local cpu_type="arm" ;;
*) local cpu_type="$machine_hardware_name" ;;
esac

echo "$cpu_type"
}

download_release() {
Expand Down

0 comments on commit 853958b

Please sign in to comment.