Skip to content

Commit

Permalink
fix: remove 3.10 as default version
Browse files Browse the repository at this point in the history
fix: windows amd64 name

fix: windows download links

fix: naming in scripts

Signed-off-by: Aaron Pham <29749331+aarnphm@users.noreply.github.com>
  • Loading branch information
aarnphm committed Dec 14, 2021
1 parent 4237854 commit 4e8aed2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion hooks/pre-commit
Expand Up @@ -9,7 +9,7 @@ VALID_BRANCH_REGEX="^(style|chore|refactor|feat|internal|bugfix|improvement|libr
cd "$GIT_ROOT" || exit

# format setup.cfg
setup-cfg-fmt "$GIT_ROOT/setup.cfg"
setup-cfg-fmt --max-py-version 3.9 "$GIT_ROOT/setup.cfg"

# Run format scripts
# ./scripts/tools/formatter.sh || exit 1
Expand Down
25 changes: 16 additions & 9 deletions scripts/ci/run_tests.sh
Expand Up @@ -132,22 +132,29 @@ parse_config() {
}

install_yq() {
set -x
target_dir="$HOME/.local/bin"

mkdir -p "$target_dir"
export PATH=$target_dir:$PATH

YQ_VERSION=4.14.2
YQ_VERSION=4.16.1
echo "Trying to install yq..."
__shell=$(uname | tr '[:upper:]' '[:lower:]')
if [[ "$__shell" =~ "mingw64*" ]]; then
__shell="windows"
shell=$(uname | tr '[:upper:]' '[:lower:]')
extensions=".tar.gz"
if [[ "$shell" =~ "mingw64" ]]; then
shell="windows"
extensions=".zip"
fi
YQ_BINARY=yq_"$__shell"_amd64
curl -fsSLO https://github.com/mikefarah/yq/releases/download/v"$YQ_VERSION"/"$YQ_BINARY".tar.gz
echo "tar $YQ_BINARY.tar.gz and move to /usr/bin/yq..."
tar -zvxf "$YQ_BINARY.tar.gz" "./$YQ_BINARY" && mv "./$YQ_BINARY" "$target_dir"/yq
rm -f ./"$YQ_BINARY".tar.gz

YQ_BINARY=yq_"$shell"_amd64
if [[ "$shell" == "windows" ]]; then
YQ_BINARY=yq_"$shell"_amd64.exe
fi
curl -fsSLO https://github.com/mikefarah/yq/releases/download/v"$YQ_VERSION"/"$YQ_BINARY""$extensions"
echo "tar $YQ_BINARY$extensions and move to /usr/bin/yq..."
tar -zvxf "$YQ_BINARY$extensions" "./$YQ_BINARY" && mv "./$YQ_BINARY" "$target_dir"/yq
rm -f ./"$YQ_BINARY""$extensions"
}


Expand Down

0 comments on commit 4e8aed2

Please sign in to comment.