Skip to content

Commit

Permalink
Merge pull request #3 from yasn77/FIX_CI_error
Browse files Browse the repository at this point in the history
fix: CI error
  • Loading branch information
yasn77 authored Feb 6, 2024
2 parents d841e66 + 1b912f3 commit 2055450
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Install Ubuntu deps
run: sudo apt-get install libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: asdf_plugin_test
uses: asdf-vm/actions/plugin-test@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions bin/download
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ plugin_dir=$(dirname "$(dirname "$current_script_path")")
# shellcheck source=./lib/utils.bash
source "${plugin_dir}/lib/utils.bash"

mkdir -p "$MISE_DOWNLOAD_PATH"
mkdir -p "$ASDF_DOWNLOAD_PATH"

release_file="$MISE_DOWNLOAD_PATH/$TOOL_NAME-$MISE_INSTALL_VERSION.zip"
release_file="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION.zip"

# Download tar.gz file to the download directory
download_release "$MISE_INSTALL_VERSION" "$release_file"
download_release "$ASDF_INSTALL_VERSION" "$release_file"

# Extract contents of tar.gz file into the download directory
unzip "$release_file" -d "$MISE_DOWNLOAD_PATH"
unzip "$release_file" -d "$ASDF_DOWNLOAD_PATH"

# Remove the tar.gz file since we don't need to keep it
rm "$release_file"
2 changes: 1 addition & 1 deletion bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ plugin_dir=$(dirname "$(dirname "$current_script_path")")
# shellcheck source=./lib/utils.bash
source "${plugin_dir}/lib/utils.bash"

install_version "$MISE_INSTALL_TYPE" "$MISE_INSTALL_VERSION" "$MISE_INSTALL_PATH"
install_version "$ASDF_INSTALL_TYPE" "$ASDF_INSTALL_VERSION" "$ASDF_INSTALL_PATH"
7 changes: 4 additions & 3 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -euo pipefail

GH_REPO="https://github.com/PaulJuliusMartinez/jless"
TOOL_NAME="jless"
TOOL_TEST="jless -V"
TOOL_TEST="jless"

fail() {
echo -e "mise-$TOOL_NAME: $*"
Expand Down Expand Up @@ -44,11 +44,12 @@ download_release() {

if [ "$OS" == "darwin" ]; then
OS="apple-darwin"
[ "$ARCH" == "arm64" ] && ARCH="aarch64"
else
OS="unknown-linux-gnu"
fi

RELEASE_FILE="jless-v${version}-${ARCH}_${OS}.zip"
RELEASE_FILE="jless-v${version}-${ARCH}-${OS}.zip"

url="$GH_REPO/releases/download/v${version}/${RELEASE_FILE}"

Expand All @@ -67,7 +68,7 @@ install_version() {

(
mkdir -p "$install_path"
cp -r "$MISE_DOWNLOAD_PATH"/* "$install_path"
cp -r "$ASDF_DOWNLOAD_PATH"/* "$install_path"

local tool_cmd
tool_cmd="$(echo "$TOOL_TEST" | cut -d' ' -f1)"
Expand Down

0 comments on commit 2055450

Please sign in to comment.