Commit Graph

49 Commits

Author SHA1 Message Date
Daniel Perez
f5152f255a WIP: support system version 2017-03-17 22:00:37 -04:00
Trevor Brown
e6c69d4676 Make sure grep uses the correct settings when invoked by asdf. 2017-03-07 13:18:20 -05:00
Victor Hugo Borja
873dc5eb3e Merge pull request #110 from vic/get_version_from_env
Get version from env if ASDF_${TOOL}_VERSION is defined.
2017-01-19 11:27:25 -06:00
Victor Hugo Borja
8709d197f1 Merge pull request #137 from vic/set-path-version
Allow `asdf local` and `asdf global` to take path: versions
2017-01-19 11:27:06 -06:00
Trevor Brown
5f3ff8ec26 Update the version in the README and utils.sh. 2016-12-21 18:45:57 -05:00
Victor Borja
716d8a93cd Allow asdf local and asdf global to take path: versions
When given a path: version, just check that the directory
actually exists.
2016-12-19 00:25:29 -06:00
Trevor Brown
127f926391 Merge pull request #123 from vic/shims-remove
Shims remove on latest version uninstall (depends on #122).
2016-12-16 15:47:24 -07:00
Victor Borja
f4bc8b58ff Merge remote-tracking branch 'origin/master' into get_version_from_env 2016-12-15 06:28:01 -06:00
Victor Borja
a1bc06fb82 Bugfix: ref: and path: versions are not read correctly.
Before this patch, with a `.tool-versions` file like:

```
lfe ref:master
```

`get_preset_version_for` would return `ref` instead of `ref:master`.

Same was happening for `path:` versions. Actually there was PR #95
on which I based my changes but instead of using space as delimiter
I went for using `|` which would be a lot more weird if present as
part of a file path, this also allows to specify paths which have
spaces which are much more frequent.

Closes #94 #95
2016-12-15 06:12:09 -06:00
Victor Borja
a98185b16a Get version from env if ASDF_${TOOL}_VERSION is defined.
For example if asdf finds that the `ASDF_FOO_VERSION` is
defined in the current environment it will override the
version of `foo` from the `.tool-version` file.

Closes #49
2016-12-15 06:10:25 -06:00
Victor Borja
d1f0b64c2f Remove shims on uninstall or plugin-remove
- Remove plugin shims when last version is uninstalled.
- Remove shims on plugin-remove

When the latest version of a tool is uninstalled,
Remove the plugin shims (marked with metadata at #122)

Also found lots of missing tests and added them.

Closes #67
2016-12-15 06:05:23 -06:00
DalHo Park
d46d6ca6df Merge branch 'master' of https://github.com/asdf-vm/asdf 2016-11-05 15:39:08 +09:00
Victor Borja
26532e7914 Determine version from global setting when project is outside home.
Without this patch, asft was not able to determine the tool version
for a project located outside the user's HOME directory.

```
/work/project/
/home/me/.tool-versions
```

This changeset lets asdf find the global version stored at
$HOME/.tool-versions when the directory traversal from
the project dir was not able to find a suitable version.
2016-10-29 06:08:54 -05:00
DalHo Park
8e59d8de98 file_path may have some spaces. 2016-10-27 16:24:34 +09:00
Kevin Rockwood
d505c0ee71 Return both version and path from find_version
This allows the current command to print the setting file.
2016-08-30 09:21:26 +09:00
Kevin Rockwood
cec4e9a737 Combine search and parse operations
We need to search and parse simultaneously in case the tool-versions 
file doesn't contain a setter line for the plugin.
2016-08-28 13:41:37 +09:00
Kevin Rockwood
280581c566 Clean up utils
Whitespace and remove dead function
2016-08-14 09:10:24 +09:00
Kevin Rockwood
c6d814e247 Unify .tool-versions and legacy file search 2016-08-14 09:10:24 +09:00
Trevor Brown
cf184ce453 Add -dev suffix to version currently in development (0.2.0). 2016-08-04 19:11:26 -04:00
Trevor Brown
c77fa1ab77 Update version in utils.sh. Next release will be 0.2.0. 2016-07-29 19:56:40 -04:00
Kevin Rockwood
ca1273e7d4 Rename which to current (#79)
* Rename `asdf which` -> `asdf current`

* Output `set by $path` with current command

* Use dummy plugin in current_command test

* Hide "set by" message if derived from legacy file
2016-07-25 00:47:17 +09:00
Laurens Duijvesteijn
337b335c4d Check if plugin exists before removing it (#77)
Check if plugin exists before removing it
2016-07-06 08:19:15 +09:00
Daniel Perez
3e31c40020 Make it possible to use fallback versions. 2016-05-04 02:22:48 +09:00
Akash Manohar J
5739dd723a Check if legacy versions are enabled before using them 2016-04-25 05:02:18 +05:30
Akash Manohar J
18ed5c106a Merge latest master 2016-04-25 04:48:12 +05:30
Daniel Perez
784d7e9f34 Add support for local and global commands. 2016-04-25 02:13:09 +09:00
Daniel Perez
d4ee3aa999 Add support for config file. 2016-04-24 22:39:24 +09:00
Trevor Brown
dcfa52e2ca Correct if statement in get_tool_version_from_legacy_file function. 2016-02-13 14:10:58 -05:00
Trevor Brown
2e17f9eb03 Reorder variables the get_tool_version_from_legacy_file function. 2016-02-13 10:32:35 -05:00
Trevor Brown
9080ff2e33 Fix bug in get_preset_version_for function. Refactor the get_tool_version_from_legacy_file function. 2016-02-13 10:30:34 -05:00
William Ashton
f4f35be9d6 Fixes #26 2015-12-22 19:00:18 -05:00
Trevor Brown
d7542d9f8f Update get_tool_version_from_legacy_file function to check for script with dashes instead of underscores. 2015-11-29 12:09:39 -05:00
Trevor Brown
0a2ff4de5c Fix logic error that was causing .tool-versions file higher in directory tree to override legacy version file. 2015-11-28 18:02:58 -05:00
Trevor Brown
89c341829c First working version of utils.sh with legacy version file support. 2015-11-28 17:27:54 -05:00
Akash Manohar J
b4ef130a32 Fix looping 2015-06-24 22:43:15 +05:30
Akash Manohar J
2f8ffabde6 Fix #15: asdf install from .tool-versions; Fix loops 2015-06-24 20:41:13 +05:30
Akash Manohar J
d428c044fc fix get_tool_version_from_file 2015-06-24 19:33:25 +05:30
Akash Manohar J
9f99442603 Merge branch 'master' of github.com:HashNuke/asdf 2015-06-24 19:17:25 +05:30
Akash Manohar J
3d64dd99ab Read global tool versions file if local doesnt specify package 2015-06-24 19:16:49 +05:30
Akash Manohar J
1bfabd67fb Replace var names 2015-05-29 21:54:31 +05:30
Akash Manohar J
d687a86ab6 Simplify vocabulary 2015-05-17 23:50:51 +05:30
Akash Manohar J
dcaee06337 it is now .tool-versions 2015-05-17 23:21:23 +05:30
Akash Manohar J
f5d4c04a35 quote var as string 2015-05-17 22:52:24 +05:30
Akash Manohar J
d06de933e1 Fixes 2015-05-17 14:39:18 +05:30
Akash Manohar J
43147ff254 Read to the top of file tree to find .asdf-versions 2015-05-15 10:06:21 +05:30
Akash Manohar J
e23f3ed206 Change asdf_versions to asdf-versions 2015-05-15 06:34:59 +05:30
Akash Manohar J
914a86507b Read .asdf-versions file 2015-05-14 15:43:04 +05:30
Akash Manohar J
c175f20bc0 Cleanup utils 2015-05-11 22:14:18 +05:30
Akash Manohar J
99ce492f15 Moved utils.sh to lib dir 2015-05-10 23:50:56 +05:30