Skip to content

Commit

Permalink
Merge pull request #6 from robzr/customize
Browse files Browse the repository at this point in the history
rename to pants
  • Loading branch information
robzr committed Feb 9, 2024
2 parents 1f484ab + da6c5ad commit 1f6b22a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 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-scie-pants [![Build](https://github.com/robzr/asdf-scie-pants/actions/workflows/build.yml/badge.svg)](https://github.com/robzr/asdf-scie-pants/actions/workflows/build.yml) [![Lint](https://github.com/robzr/asdf-scie-pants/actions/workflows/lint.yml/badge.svg)](https://github.com/robzr/asdf-scie-pants/actions/workflows/lint.yml)
# asdf-pants [![Build](https://github.com/robzr/asdf-pants/actions/workflows/build.yml/badge.svg)](https://github.com/robzr/asdf-pants/actions/workflows/build.yml) [![Lint](https://github.com/robzr/asdf-pants/actions/workflows/lint.yml/badge.svg)](https://github.com/robzr/asdf-pants/actions/workflows/lint.yml)

[scie-pants](https://www.pantsbuild.org/2.18/docs/getting-started/installing-pants) plugin for the [asdf version manager](https://asdf-vm.com).
[pants](https://www.pantsbuild.org/2.18/docs/getting-started/installing-pants) plugin for the [asdf version manager](https://asdf-vm.com).

</div>

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

```shell
asdf plugin add scie-pants
asdf plugin add pants
# or
asdf plugin add scie-pants https://github.com/robzr/asdf-scie-pants.git
asdf plugin add pants https://github.com/robzr/asdf-pants.git
```

scie-pants:
pants:

```shell
# Show all installable versions
asdf list-all scie-pants
asdf list-all pants

# Install specific version
asdf install scie-pants latest
asdf install pants latest

# Set a version globally (on your ~/.tool-versions file)
asdf global scie-pants latest
asdf global pants latest

# Now scie-pants commands are available
scie-pants --help
# Now pants commands are available
pants --help
```

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/robzr/asdf-scie-pants/graphs/contributors)!
[Thanks goes to these contributors](https://github.com/robzr/asdf-pants/graphs/contributors)!

# License

Expand Down
2 changes: 1 addition & 1 deletion bin/download
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ release_file="$ASDF_DOWNLOAD_PATH/scie-pants-${OS}-${ARCH}"

download_release "$ASDF_INSTALL_VERSION" "$release_file"

release_file_target="$ASDF_DOWNLOAD_PATH/scie-pants"
release_file_target="$ASDF_DOWNLOAD_PATH/pants"

mv "$release_file" "$release_file_target"
2 changes: 1 addition & 1 deletion contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Testing Locally:
asdf plugin test <plugin-name> <plugin-url> [--asdf-tool-version <version>] [--asdf-plugin-gitref <git-ref>] [test-command*]

# TODO: adapt this
asdf plugin test scie-pants https://github.com/robzr/asdf-scie-pants.git "scie-pants --help"
asdf plugin test pants https://github.com/robzr/asdf-pants.git "pants --help"
```

Tests are automatically run in GitHub Actions on push and PR.
5 changes: 2 additions & 3 deletions lib/utils.bash
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
set -euo pipefail

GH_REPO="https://github.com/pantsbuild/scie-pants"
TOOL_NAME="scie-pants"
TOOL_TEST="scie-pants --help"
TOOL_NAME="pants"
TOOL_TEST="pants --help"

fail() {
echo -e "asdf-$TOOL_NAME: $*"
Expand Down Expand Up @@ -57,7 +57,6 @@ install_version() {
mkdir -p "$install_path"
cp -r "$ASDF_DOWNLOAD_PATH"/* "$install_path"

# TODO: Assert scie-pants 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 1f6b22a

Please sign in to comment.