Commit Graph

157 Commits

Author SHA1 Message Date
Chris Dosé
f399254219 code review feedback: fix all shellcheck warnings. 2017-04-19 20:37:03 -07:00
Chris Dosé
96c24e9255 code review feedback: git reset instead of git pull 2017-04-19 20:26:33 -07:00
Chris Dosé
20cdbfe701
Use a git repository for installing plugins. 2017-03-26 16:44:22 -07:00
Trevor Brown
2ca517d8c1 Add tests for the update command. Use sed instead of tail -r to get the
latest tag from the list of sorted tags.

The setup code for these tests isn't ideal. It would be nice not to have
to worry about the remote. Without the 'origin' remote set the Travis
build would fail though.
2017-03-17 21:19:46 -04:00
Trevor Brown
8534ca2858 Finish the update command. 2017-03-17 13:07:30 -04:00
Trevor Brown
492ea04cc0 Add update command. 2017-03-17 13:07:30 -04:00
Akash Manohar
7c2514d93b Merge pull request #171 from asdf-vm/test-for-plugin-license
Update the plugin-test command to assert that the plugin license file exists
2017-03-16 06:50:30 +05:30
Bjørn Madsen
887de73b79 Avoid error when sysctl is missing hw.ncpu key 2017-03-13 09:13:42 +01:00
Trevor Brown
3c449deb97 Update the plugin-test command to assert that the plugin license file exists and is not empty. 2017-03-07 17:33:41 -05:00
Trevor Brown
e6c69d4676 Make sure grep uses the correct settings when invoked by asdf. 2017-03-07 13:18:20 -05:00
Trevor Brown
85e56753fd Don't change the permissions on files in a plugin's bin directory. 2017-02-11 20:46:34 -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
9ac1df50aa Merge pull request #138 from Stratus3D/check-plugin-permissions
Check permissions on scripts in plugins' bin directories when testing
2016-12-27 08:10:37 -07:00
Trevor Brown
2e96bc63eb Merge branch 'release-v0.2.1' 2016-12-25 12:14:09 -05:00
Trevor Brown
dff1149fb5 Check permissions on scripts in plugins' bin directories when testing them. 2016-12-21 20:58:11 -05: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
Stratus3D
7c28074423 Add a helpful error message to the install command to warn users when they don't specify a version to install. 2016-12-18 12:52:23 -05: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
Victor Borja
6ddf1e5e49 Fix shim args again.
Broken here:

00bf082b31 (diff-774f80a035a812fafdd48ebc7c8b6af4R54)

but this time we have tests to notice:

https://travis-ci.org/asdf-vm/asdf/builds/184202823
2016-12-15 05:34:35 -06:00
Tadeu Andrade
6d78d4fd80 Reverting slash on quotes 2016-12-13 10:03:28 -03:00
mtatheonly
e04fe9ed54 Update reshim.sh
Removing unneeded slash from shim writing.
2016-12-12 18:54:52 -03:00
Victor Borja
7512d9abf4 Add metadata to shims
When a shim is created, add plugin metadata so we can later know which shims belong to which plugins, this will help aid with removing unused shims on uninstall. See #67

```
# asdf-plugin: ${plugin_name}”
```

Thanks to @duijf for the metadata proposal.
2016-12-10 12:17:50 -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
Stratus3D
20ef5321e1 Update the install_command function so it works when invoked in directory whose name contains whitespace. 2016-10-25 21:45:17 -04:00
Daniel Perez
95bde8e86f Fix local and global commands to accept multiple versions 2016-08-30 19:13:10 -04:00
Stratus3D
12a6316e4c Fix whitespace bug in 'asdf local'. 2016-08-30 19:13:10 -04: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
511535b750 Add warning to when using deprecated plugins
This can be removed after we've given users enough time to update.
2016-08-14 09:10:24 +09:00
Kevin Rockwood
4d75ddd50b Update current command with new util functions
current will now print paths to legacy files and .tool-version files
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
7517aa3abc Remove getter feature on local and global commands
This simplifies the `local` and `global` commands. `asdf current` should
be sufficient for getting the current version.

closes #80
2016-07-25 09:44:53 +09: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
Laurens Duijvesteijn
ccefa996dc plugin-update: argument validation 2016-07-03 13:15:57 +02:00
Laurens Duijvesteijn
f9572739f6 plugin-add: argument validation 2016-07-03 13:11:40 +02:00
Daniel Perez
a8f67c9821 Fix issue in install get_concurrency 2016-07-01 18:26:25 +09:00
Daniel Perez
3af5d21067 Set ASDF_CONCURRENCY when installing 2016-07-01 16:42:59 +09:00
Daniel Perez
caee08d39b Improve plugin tests 2016-06-17 18:37:26 +09:00