Commit Graph

1022 Commits

Author SHA1 Message Date
Victor Hugo Borja
8ccfda26b8 Prevent warning about global ASDF_DIR being undefined. 2019-01-21 22:45:32 -06:00
Victor Hugo Borja
0260c442cc Test to ensure asdf exec and asdf env use plugin custom exec-env 2019-01-21 01:33:52 -06:00
Victor Hugo Borja
2e22409c90 v0.6.4-dev 2019-01-20 14:39:18 -06:00
Victor Hugo Borja
ab59e5618f Move common functionality to utils.sh
- Make shim-exec, shim-env, and which use the same logic to look for commands
- Make sure shim-exec and which use a plugin exec-path hook as documented
  (the hook takes a relative path to the executable and returns also
   a relative path, possibly modified)
- Fix shellchecks
2019-01-20 14:02:22 -06:00
Victor Hugo Borja
9cac0ac50a Faster exec times. Load commands only when nedded.
When testing, use `run asdf` to actually test the command
as the user would invoke it, so that we might catch possible
errors on `bin/asdf`.
2019-01-20 02:13:20 -06:00
Victor Borja
7ff64ef64a
Merge pull request #435 from vic/shim-env
Add `asdf env` command
2019-01-19 21:14:31 -06:00
Victor Hugo Borja
8927a4a09f Add asdf env command 2019-01-19 20:59:27 -06:00
Victor Hugo Borja
89775c8d88 fix lint on shim-exec 2019-01-19 20:25:41 -06:00
Victor Hugo Borja
6da747b6ce Test that asdf exec works even if asdf shims are not in PATH. 2019-01-19 20:09:53 -06:00
Victor Hugo Borja
e51f778b61 Move bin/private/asdf-tool-exec to be asdf exec command
This way the code for executing shims can also be invoked via
`asdf exec <tool> [args..]` and can be linted.
2019-01-19 20:02:14 -06:00
Victor Borja
f1809ae290
Remove duplicate entries from merge.
Remove entries on 0.6.3 that are actually on 0.6.4-dev
2019-01-19 14:52:59 -06:00
Victor Hugo Borja
cc78863092 Merge branch '0.6.4-dev' 2019-01-19 14:06:28 -06:00
Victor Hugo Borja
a46eaf3b4a Merge remote-tracking branch 'origin/shim-versions-command' into 0.6.4-dev 2019-01-19 13:56:56 -06:00
Victor Hugo Borja
9420ca1aec Add hooks for plugin uninstall 2019-01-19 13:48:21 -06:00
Victor Hugo Borja
dcc3727cab Add pre-install and pre-reshim hooks 2019-01-19 13:32:07 -06:00
Victor Hugo Borja
9a79ac9526 user configurable pre-post command hooks
Suppose a `foo` plugin is installed and provides a `bar` executable.
The following hooks will be executed when set in `.asdfrc`:

```shell
post_asdf_install_foo = echo installed foo version ${1}
post_asdf_reshim_foo = echo reshimmed foo version ${1}

pre_foo_bar = echo about to execute command bar from foo with args: ${@}
post_foo_bar = echo just executed command bar from foo with args: ${@}
```
2019-01-19 13:32:07 -06:00
Victor Hugo Borja
2c9621c1cc New shim metadata to allow many plugins with same executable names
Features

* New shim version meta-data allows shims to not depend on a particular plugin
  nor on its relative executable path (#431)
  Upgrading requires shim re-generation and should happen automatically
  by `asdf-exec`:
    `rm -rf ~/.asdf/shims/` followed by `asdf reshim`
* Added lots of tests for shim execution.
  We now make sure that shim execution obeys plugins hooks like
  `list-bin-paths` and `exec-path`.
* Shim exec is now performed by a new `bin/private/asdf-tool-exec` that might
  be faster for most common use case: (versions on local .tool-versions file)
  but fallbacks to slower `get_preset_version_for` which takes legacy formats
  into account.
* Shim exec recommends which plugins or versions to set when command is
  not found.

Fixed Bugs

* Allow many plugins to provide shims with same executable name (#431)
2019-01-19 13:32:07 -06:00
Victor Hugo Borja
7fda291df0 Add asdf shim-versions command (#380)
For example `asdf shim-versions npm` will list the plugins and their
versions on which the `npm` command is available.

Based on #432
2019-01-19 13:31:26 -06:00
Victor Hugo Borja
4766a2b0b2 New shim metadata to allow many plugins with same executable names
Features

* New shim version meta-data allows shims to not depend on a particular plugin
  nor on its relative executable path (#431)
  Upgrading requires shim re-generation and should happen automatically
  by `asdf-exec`:
    `rm -rf ~/.asdf/shims/` followed by `asdf reshim`
* Added lots of tests for shim execution.
  We now make sure that shim execution obeys plugins hooks like
  `list-bin-paths` and `exec-path`.
* Shim exec is now performed by a new `bin/private/asdf-tool-exec` that might
  be faster for most common use case: (versions on local .tool-versions file)
  but fallbacks to slower `get_preset_version_for` which takes legacy formats
  into account.
* Shim exec recommends which plugins or versions to set when command is
  not found.

Fixed Bugs

* Allow many plugins to provide shims with same executable name (#431)
2019-01-19 13:31:26 -06:00
Victor Hugo Borja
94eadeb3ce Update changelog 2019-01-19 13:27:48 -06:00
Victor Hugo Borja
ed843f29f6 asdf reshim without arguments will reshim all plugins. (#407) 2019-01-19 13:22:12 -06:00
Victor Hugo Borja
9b27848d07 New shim metadata to allow many plugins with same executable names
Features

* New shim version meta-data allows shims to not depend on a particular plugin
  nor on its relative executable path (#431)
  Upgrading requires shim re-generation and should happen automatically
  by `asdf-exec`:
    `rm -rf ~/.asdf/shims/` followed by `asdf reshim`
* Added lots of tests for shim execution.
  We now make sure that shim execution obeys plugins hooks like
  `list-bin-paths` and `exec-path`.
* Shim exec is now performed by a new `bin/private/asdf-tool-exec` that might
  be faster for most common use case: (versions on local .tool-versions file)
  but fallbacks to slower `get_preset_version_for` which takes legacy formats
  into account.
* Shim exec recommends which plugins or versions to set when command is
  not found.

Fixed Bugs

* Allow many plugins to provide shims with same executable name (#431)
2019-01-19 13:22:12 -06:00
John Doe
59c1cc0b37 Commit all files changed by release.sh before it tags 2019-01-19 09:29:55 -05:00
John Doe
1886e00cf1 Update version to 0.6.3 2019-01-19 09:14:56 -05:00
John Doe
74b8e56722 Preparing for 0.6.3 release. 2019-01-19 09:13:36 -05:00
James Hegedus
786fac791c
Merge pull request #430 from jthegedus/readme-uninstall-fix
Readme uninstall fix
2019-01-16 07:53:41 +11:00
jthegedus
9a6f6474e6 fix link to uninstall instructions from the README 2019-01-16 07:42:43 +11:00
jthegedus
aeab589fbd improve prose of uninstall instructions 2019-01-16 07:42:14 +11:00
Trevor Brown
8167103f59
Merge pull request #427 from aeons/patch-1
Fix README link to plugin API
2019-01-14 09:15:41 -05:00
Bjørn Madsen
94c0b9e645
Fix link to plugin API 2019-01-14 15:05:15 +01:00
James Hegedus
2fcde332ae Documentation site (#422)
* init docsify
* add config & plugins to support required features
* create cover page
* add sidebar headings
* add novel 404 page
* add translation message to 404
* add navbar with translations dropdown
* fix punctuation
* add all-plugins section pulling from asdf-plugins repo readme
* update sidebar with sections, better names & descriptions for contributors
* add changelog. pulls from repo
* add thanks page. credits, maintainers & link to contributors on github
* add core documentation
* rm old readme from docs/ folder
this was copied here on docsify init
* comment out some translation config
  ideally this will remain commented out serving as an example for any translation contributions
* run prettier over markdown
* add plugins-create section
* add contributing sections to the docs
* fix cover page get-started link
* use the readme as the main homepage
* update asdf version in docs with release script
2019-01-12 11:32:30 -05:00
Trevor Brown
06c1e66048
Merge pull request #424 from Stratus3D/custom-exec-path-tests
Custom exec path tests
2019-01-05 11:19:19 -05:00
Trevor Brown
8f242e7ec2 Address shellcheck warnings 2019-01-05 11:10:59 -05:00
Trevor Brown
8bcf8caba4 Write test for the exec-path functionality in the which command 2019-01-05 10:54:02 -05:00
Trevor Brown
c37307a2cc Create get_custom_executable_path function to hold the custom exec path logic 2019-01-05 10:23:41 -05:00
James Hegedus
cdf648c7c0
Merge pull request #423 from wulfmann/readme
improve macOS Brew installation setup
2019-01-05 09:55:51 +11:00
Joe Snell
a1bf491678 fix link and code highlighting 2019-01-04 10:45:02 -06:00
Joe Snell
8d1af015eb fix out of order line 2019-01-04 10:41:28 -06:00
Joe Snell
4b65669457 add homebrew section to readme and reorganize slightly 2019-01-04 10:40:14 -06:00
Trevor Brown
ed3063ac30
Merge pull request #421 from lojack/fish-path-fix
Fixed user paths for fish
2019-01-02 15:52:06 -05:00
Robert Clark
733b4d8dde Updated test for path 2018-12-29 18:46:22 -05:00
Robert Clark
08655e9606 Fixed user paths for fish 2018-12-29 14:17:38 -05:00
Trevor Brown
c2572af596
Merge pull request #419 from Raphx/continue-list-on-version-not-found
Continue list even when version is not found
2018-12-27 21:11:55 -05:00
Raphx
ec6662d4c0
Continue list even when version is not found
Previous implementation exits abruptly when no version is installed for
a plugin. This prevented the list command from listing the versions for
some other plugins.

This commit allows list command to continue executing even when no
version is installed for some plugins.

Example, plugin a with 1.0, b with none, and c with 2.0.

Previous implementation:

```
$ asdf list

a
  1.0
b
No versions installed
```

After commit changes:

```
$ asdf list

a
  1.0
b
No versions installed
c
  2.0
```
2018-12-28 09:21:43 +08:00
Trevor Brown
922faffd7c
Merge pull request #417 from asdf-vm/tests-for-env-var-versions
Add tests for versions set by environment variables
2018-12-22 15:19:36 -05:00
Trevor Brown
54fc0f43dd Add tests for versions set by environment variables
Fixes #327
2018-12-22 15:11:28 -05:00
Trevor Brown
fcf5f3653c
Merge pull request #416 from asdf-vm/fix-shellcheck-warnings
Fix shellcheck warnings on OSX
2018-12-21 17:34:37 -05:00
Trevor Brown
41e2059a3e Fix shellcheck warnings on OSX 2018-12-20 17:25:30 -05:00
Trevor Brown
7494b11ada
Merge pull request #408 from asdf-vm/Stratus3D-patch-1
Remove unused asdf shims directory
2018-12-04 09:51:01 -05:00
Trevor Brown
7ca88746a8
Merge pull request #411 from rliebz/update
Fix issues with update command
2018-12-02 14:12:23 -05:00