generated from asdf-vm/asdf-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3205bc0
commit a315767
Showing
18 changed files
with
39 additions
and
332 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ on: | |
|
||
jobs: | ||
plugin_test: | ||
name: asdf plugin test | ||
name: plugin test | ||
strategy: | ||
matrix: | ||
os: | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
|
||
current_script_path=${BASH_SOURCE[0]} | ||
plugin_dir=$(dirname "$(dirname "$current_script_path")") | ||
|
||
# shellcheck source=./lib/utils.bash | ||
source "${plugin_dir}/lib/utils.bash" | ||
set -eux | ||
|
||
mkdir -p "$ASDF_DOWNLOAD_PATH" | ||
|
||
release_file="$ASDF_DOWNLOAD_PATH/dt.tgz" | ||
|
||
# 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" || fail "Could not extract $release_file" | ||
|
||
# Remove the tar.gz file since we don't need to keep it | ||
rm "$release_file" | ||
host_zig_triple() { | ||
_arch="$(uname -m)" | ||
case "$_arch" in | ||
arm64) echo -n 'aarch64-' ;; | ||
amd64) echo -n 'x86_64-' ;; | ||
*) echo -n "$_arch-" ;; | ||
esac | ||
|
||
case "$(uname -s | tr A-Z a-z)" in | ||
linux) echo -n 'linux-gnu' ;; | ||
*bsd) echo -n 'linux-gnu' ;; | ||
osx | darwin | mac*) echo -n 'macos-none' ;; | ||
esac | ||
} | ||
|
||
url="$GH_REPO/releases/download/v${ASDF_INSTALL_VERSION}/dt-$(host_zig_triple).tgz" | ||
|
||
curl "$url" \ | ||
-o "$ASDF_DOWNLOAD_PATH/" \ | ||
-C - | ||
|
||
tar -xzf "$release_file" \ | ||
-C "$ASDF_DOWNLOAD_PATH" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -euo pipefail | ||
set -eux | ||
|
||
current_script_path=${BASH_SOURCE[0]} | ||
plugin_dir=$(dirname "$(dirname "$current_script_path")") | ||
if [ "$ASDF_INSTALL_TYPE" != "version" ] | ||
then | ||
>&2 echo 'asdf-dt supports release installs only' | ||
exit 1 | ||
fi | ||
|
||
# shellcheck source=./lib/utils.bash | ||
source "${plugin_dir}/lib/utils.bash" | ||
mkdir -p "$ASDF_INSTALL_PATH" | ||
|
||
install_version "$ASDF_INSTALL_TYPE" "$ASDF_INSTALL_VERSION" "$ASDF_INSTALL_PATH" | ||
cp "$ASDF_DOWNLOAD_PATH"/dt "$ASDF_INSTALL_PATH/bin/dt" | ||
|
||
test -x "$ASDF_INSTALL_PATH/bin/dt --version" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.