Skip to content

Commit

Permalink
rename to jetted
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacharrisholt committed Nov 21, 2024
1 parent abc5de8 commit 931d2a0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div align="center">

# asdf-jtd-codegen [![Build](https://github.com/DocumaticAI/asdf-jtd-codegen/actions/workflows/build.yml/badge.svg)](https://github.com/DocumaticAI/asdf-jtd-codegen/actions/workflows/build.yml) [![Lint](https://github.com/DocumaticAI/asdf-jtd-codegen/actions/workflows/lint.yml/badge.svg)](https://github.com/DocumaticAI/asdf-jtd-codegen/actions/workflows/lint.yml)
# asdf-jetted [![Build](https://github.com/DocumaticAI/asdf-jetted/actions/workflows/build.yml/badge.svg)](https://github.com/DocumaticAI/asdf-jetted/actions/workflows/build.yml) [![Lint](https://github.com/DocumaticAI/asdf-jetted/actions/workflows/lint.yml/badge.svg)](https://github.com/DocumaticAI/asdf-jetted/actions/workflows/lint.yml)

[jtd-codegen](https://github.com/DocumaticAI/json-typedef-codegen) plugin for the [asdf version manager](https://asdf-vm.com).
[jetted](https://github.com/DocumaticAI/jetted) plugin for the [asdf version manager](https://asdf-vm.com).

</div>

Expand All @@ -25,25 +25,25 @@
Plugin:

```shell
asdf plugin add jtd-codegen
asdf plugin add jetted
# or
asdf plugin add jtd-codegen https://github.com/DocumaticAI/asdf-jtd-codegen.git
asdf plugin add jetted https://github.com/DocumaticAI/asdf-jetted.git
```

jtd-codegen:
jetted:

```shell
# Show all installable versions
asdf list-all jtd-codegen
asdf list-all jetted

# Install specific version
asdf install jtd-codegen latest
asdf install jetted latest

# Set a version globally (on your ~/.tool-versions file)
asdf global jtd-codegen latest
asdf global jetted latest

# Now jtd-codegen commands are available
jtd-codegen --version
# Now jetted commands are available
jetted --version
```

Check [asdf](https://github.com/asdf-vm/asdf) readme for more instructions on how to
Expand All @@ -53,7 +53,7 @@ install & manage versions.

Contributions of any kind welcome! See the [contributing guide](contributing.md).

[Thanks goes to these contributors](https://github.com/DocumaticAI/asdf-jtd-codegen/graphs/contributors)!
[Thanks goes to these contributors](https://github.com/DocumaticAI/asdf-jetted/graphs/contributors)!

# License

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

set -euo pipefail

# TODO: Ensure this is the correct GitHub homepage where releases can be downloaded for jtd-codegen.
GH_REPO="https://github.com/DocumaticAI/json-typedef-codegen"
TOOL_NAME="jtd-codegen"
TOOL_TEST="jtd-codegen --version"
# TODO: Ensure this is the correct GitHub homepage where releases can be downloaded for jetted.
GH_REPO="https://github.com/DocumaticAI/jetted"
TOOL_NAME="jetted"
TOOL_TEST="jetted --version"

fail() {
echo -e "asdf-$TOOL_NAME: $*"
Expand All @@ -14,7 +14,7 @@ fail() {

curl_opts=(-fsSL)

# NOTE: You might want to remove this if jtd-codegen is not hosted on GitHub releases.
# NOTE: You might want to remove this if jetted is not hosted on GitHub releases.
if [ -n "${GITHUB_API_TOKEN:-}" ]; then
curl_opts=("${curl_opts[@]}" -H "Authorization: token $GITHUB_API_TOKEN")
fi
Expand All @@ -32,7 +32,7 @@ list_github_tags() {

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

Expand All @@ -41,7 +41,7 @@ download_release() {
version="$1"
filename="$2"

# TODO: Adapt the release URL convention for jtd-codegen
# TODO: Adapt the release URL convention for jetted
url="$GH_REPO/archive/v${version}.tar.gz"

echo "* Downloading $TOOL_NAME release $version..."
Expand All @@ -61,7 +61,7 @@ install_version() {
mkdir -p "$install_path"
cp -r "$ASDF_DOWNLOAD_PATH"/* "$install_path"

# TODO: Assert jtd-codegen executable exists.
# TODO: Assert jetted executable exists.
local tool_cmd
tool_cmd="$(echo "$TOOL_TEST" | cut -d' ' -f1)"
test -x "$install_path/$tool_cmd" || fail "Expected $install_path/$tool_cmd to be executable."
Expand Down

0 comments on commit 931d2a0

Please sign in to comment.