Skip to content

Commit

Permalink
ci: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
Sven Luijten committed May 1, 2023
1 parent 63954f1 commit f37be36
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions bin/download
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ release_file="$ASDF_DOWNLOAD_PATH/$TOOL_NAME-$ASDF_INSTALL_VERSION.tar.gz"
# Download tar.gz file to the download directory
download_release "$ASDF_INSTALL_VERSION" "$release_file"

# Extract contents of tar.gz file into the download directory
tar -xzf "$release_file" -C "$ASDF_DOWNLOAD_PATH" --strip-components=1 || fail "Could not extract $release_file"
echo "*** Release file: $release_file\n"
echo "*** Download path: $ASDF_DOWNLOAD_PATH\n"

ls -lah "$ASDF_DOWNLOAD_PATH";
# Extract contents of tar.gz file into the download directory
tar --verbose --verbose -xzf "$release_file" -C "$ASDF_DOWNLOAD_PATH" || fail "Could not extract $release_file"

# Remove the tar.gz file since we don't need to keep it
rm "$release_file"
6 changes: 5 additions & 1 deletion lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,14 @@ download_release() {
arch="$(get_arch)"
platform="$(get_platform)"

url="$GH_REPO/archive/v${version}.tar.gz"
echo "*** Version: $version"
echo "*** Platform: $platform"
echo "*** Arch: $arch"

url=$(curl -s "https://api.github.com/repos/guumaster/hostctl/releases/tags/v${version}" | grep -o -E "https://.+?_${platform,,}_${arch}.tar.gz")

echo "*** URL: $url"

echo "* Downloading $TOOL_NAME release $version..."
curl "${curl_opts[@]}" -o "$filename" -C - "$url" || fail "Could not download $url"
}
Expand Down

0 comments on commit f37be36

Please sign in to comment.