Henrik Nyh
d7ceb38b06
Avoid bash error when no version is set
...
Running "asdf current ruby" before installing any Rubies gave me:
/Users/henrik/.asdf/lib/utils.sh: line 73: [: !=: unary operator expected
No version set for ruby
2017-04-08 09:38:18 +01:00
Trevor Brown
974597ddc7
Correct sed command that removes asdf from PATH.
2017-03-27 11:04:52 -04:00
Chris Dosé
20cdbfe701
Use a git repository for installing plugins.
2017-03-26 16:44:22 -07:00
Trevor Brown
0f7757a910
Correct if statements in asdf-exec and utils.sh.
2017-03-25 14:50:30 -04:00
Daniel Perez
23f92987c0
Start adding tests for system version
2017-03-17 22:00:38 -04:00
Daniel Perez
f5152f255a
WIP: support system version
2017-03-17 22:00:37 -04: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
Fernando Crespo
2260d22d79
Add missing function checking for deprecated plugins
2017-03-16 00:57:07 -03: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
Fernando Crespo
9657ff690e
Add path to which command
2017-03-14 11:09:34 -03:00
Fernando Crespo
9d347deb0b
Add plugin name to command
2017-03-14 11:08:18 -03:00
Fernando Crespo
3e72800052
add parameter to current version
2017-03-14 11:07:22 -03:00
Fernando Crespo
1ea63ec257
Fix extra paren
2017-03-14 11:06:07 -03:00
Fernando Crespo
5ccb7d75f5
Fix no install_type
2017-03-14 11:04:30 -03:00
Fernando Crespo
fb4e263598
Initial support for which command
2017-03-14 10:56:59 -03:00
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
Robin Schneider
7c30e6f9d2
Fix typo: seperated → separated
...
Automated edit command: git ls-files -z "$(git rev-parse --show-toplevel)" | xargs --null -I '{}' find '{}' -type f -print0 | xargs --null sed --in-place --regexp-extended 's/seperated/separated/g;'
2017-02-20 19:44:44 +01: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
Akash Manohar
c3765182f8
Merge pull request #51 from tuvistavie/use-multiple-versions
...
Make it possible to use fallback versions. Thank you @tuvistavie ~!
2016-05-14 15:19:29 +05:30
Akash Manohar
9c74973f8b
Merge pull request #54 from tuvistavie/plugin-test
...
Add command and instructions to test plugin. Thank you @tuvistavie ~!
2016-05-14 10:07:17 +05:30
Daniel Perez
61e014a2d6
Fix local command bug.
2016-05-14 11:11:16 +09:00
Daniel Perez
072a57e4cb
Add command and instructions to test plugin.
2016-05-13 16:04:01 +09:00
Daniel Perez
3e31c40020
Make it possible to use fallback versions.
2016-05-04 02:22:48 +09:00
Daniel Perez
b0513a6da0
Fix local command to support legacy files.
2016-05-03 00:27:52 +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
Akash Manohar J
d217514081
Fix loop bug during install with blank line in .tool-versions
2016-01-17 08:00:53 +05:30
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
ad0d365cf4
Executable check should use actual file path
2015-11-19 08:49:19 +05:30
Stratus3D
225c690893
Remove duplicate call to write_shim_script.
2015-11-13 11:36:25 -05:00
Trevor Brown
8e96be3243
Remove todo comment.
2015-11-05 06:43:12 -05:00
Trevor Brown
9bdc207ee2
Add check to ensure file is an executable in generate_shims_for_version function.
2015-11-05 06:35:53 -05:00
Akash Manohar
f4aa56b764
Merge pull request #20 from PSPDFKit-labs/master
...
Fix path: syntax in .tools-version & use exec
2015-10-26 08:17:57 +05:30
Martin Schürrer
aaa8abfd23
Don't spawn subshells, use exec
2015-10-01 19:31:53 +02:00
Akash Manohar J
89f5566fb4
Just use exit code 1 instead of inheriting it
2015-08-11 21:50:46 +05:30
Akash Manohar J
ec866a1bb1
Fix #19 : Delete install path if install fails
2015-07-28 11:32:56 +05:30
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
Kevin Disneur
8904de08d3
Skip installation if the version is already installed
2015-06-15 20:04:58 +01:00
Akash Manohar J
6f6ac56540
Merge branch 'master' of https://github.com/HashNuke/asdf
2015-06-15 18:32:42 +05:30
Akash Manohar J
77d4169cac
'Already installed' is a warning exit normally
2015-06-15 18:30:20 +05:30
Akash Manohar J
6b3a6f0011
Warn if plugin already installed
2015-06-15 18:29:27 +05:30
Akash Manohar J
bf0f9bc1fe
Remove bulleting from plugin list
2015-06-14 18:55:20 +05:30
Kevin Disneur
7bb35d04ee
Update 'no plugin installed' message
2015-06-14 14:22:17 +01:00
Kevin Disneur
c2fc8dd34e
Add a command to list the plugins already installed
2015-06-14 13:37:48 +01:00
Akash Manohar J
681daec95a
Check for custom shim templates in $plugin/shims
2015-06-07 00:30:55 +05:30
Akash Manohar J
1bfabd67fb
Replace var names
2015-05-29 21:54:31 +05:30
Akash Manohar J
a59fddd265
Fix list command
2015-05-29 21:50:32 +05:30
Akash Manohar J
34222e34ab
add where command to get install path
2015-05-29 00:08:13 +05:30
Akash Manohar J
00fa189b6e
Rename package_name var to plugin_name everywhere
2015-05-27 12:16:17 +05:30
Akash Manohar J
ecd559545d
package_name should be plugin_name
2015-05-27 12:13:26 +05:30
Akash Manohar J
d037628e7e
Add which command
2015-05-27 12:13:10 +05:30
Akash Manohar J
97bdbc01b1
Fix shim and reshim
2015-05-24 15:12:30 +05:30
Akash Manohar J
0310c6e669
t push origin master
...
Merge branch 'master' of https://github.com/HashNuke/asdf
2015-05-24 15:04:35 +05:30
Akash Manohar J
44e991b49e
mkdir install path
2015-05-24 15:04:20 +05:30
Akash Manohar J
3217a1f99e
Merge and resolve conflicts
2015-05-24 15:03:56 +05:30
Akash Manohar J
bcb4780b33
Add shim command
2015-05-24 15:02:38 +05:30
Akash Manohar J
e4cde2a10c
Warn if version already installed
2015-05-22 10:58:18 +05:30
Akash Manohar J
9ca6cd269f
list-all does not need the arguments
2015-05-22 10:49:07 +05:30
Akash Manohar J
1d9fe07a11
Adhere to new & stable plugin API
2015-05-22 10:47:44 +05:30
Akash Manohar J
0f1db84981
Remove last use of tag/commit
2015-05-22 10:19:39 +05:30
Akash Manohar J
2bb9fa036d
Simplify tag/commit to ref
2015-05-22 10:17:27 +05:30
Akash Manohar J
5be6ee1440
Update plugin-push and plugin-update
2015-05-21 10:01:09 +05:30
Akash Manohar J
07c66d4282
Add plugin-push to make development easier
2015-05-21 09:55:17 +05:30
Akash Manohar J
0ffd6d9e79
Stick to bash for shims too
2015-05-20 12:22:46 +05:30
Akash Manohar J
79d61b38b7
clearly say no versions found
2015-05-19 12:17:00 +05:30
Akash Manohar J
84097388e6
Fir dir names
2015-05-18 00:02:57 +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
52ce0afcf4
default to bin dir if list-bin-paths is not found
2015-05-17 23:14:16 +05:30
Akash Manohar J
132971c290
Escape double quotes
2015-05-17 22:58:49 +05:30
Akash Manohar J
f5d4c04a35
quote var as string
2015-05-17 22:52:24 +05:30
Akash Manohar J
00edadd6d3
Fix shim generator
2015-05-17 19:08:05 +05:30
Akash Manohar J
256e6cb000
Improve reshim command
2015-05-17 19:02:47 +05:30
Akash Manohar J
78c2c9b3fc
if [ condition ]; then
2015-05-17 16:17:45 +05:30
Akash Manohar J
d06de933e1
Fixes
2015-05-17 14:39:18 +05:30
Akash Manohar J
1e1ea643e3
Fix typo
2015-05-17 14:19:28 +05:30
Akash Manohar J
44ef58def1
Move around commands dir
2015-05-17 14:01:55 +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
Akash Manohar J
886daefb26
Remove unnecessary file
2015-05-10 22:59:32 +05:30
Akash Manohar J
21e4c156d3
Move out reshim and exec
2015-05-10 22:55:42 +05:30
Akash Manohar J
4e90b9405e
TODO move out reshim and exec commands
2015-05-08 11:32:07 +05:30
Akash Manohar J
a0594000a8
Delete docs.sh
2015-05-08 11:28:45 +05:30
Akash Manohar J
dca70739f5
echo help text from file
2015-05-06 19:15:17 +05:30
Akash Manohar J
6632e18d4f
Reshim after install; Create shims dir if doesn't exist
2015-05-06 19:04:55 +05:30
Akash Manohar J
2b1f2349b1
Don't pass extra args to script
2015-03-03 11:59:48 +05:30
Akash Manohar J
d596987f55
Use uninstall script if available, else just delete the install path
2014-12-19 11:11:14 +05:30
Akash Manohar J
a1e7b8ce36
chmod +x bin/* scripts once source has been cloned
2014-12-19 09:45:49 +05:30
Akash Manohar J
53962a986d
list-all should return a string with versions seperated by space
2014-12-18 16:28:25 +05:30
Akash Manohar J
459839604c
Check for exec-env and call it to get env vars
2014-12-14 22:25:21 +05:30
Akash Manohar J
26ec9a774a
Ability to set env vars in bin/exec-env
2014-12-14 22:22:37 +05:30
Akash Manohar J
7f86587353
Add reshim command
2014-12-14 13:43:43 +05:30
Akash Manohar J
9c3171a726
Add todo message
2014-12-13 21:58:57 +05:30
Akash Manohar J
e8806caf61
Fix installs; list command working
2014-12-13 21:56:56 +05:30
Akash Manohar J
95d5458706
Create the sources dir before clone a source dir
2014-11-30 21:39:56 +05:30
Akash Manohar J
4fde901a56
Add source-add, source-update, source-remove
2014-11-30 21:37:33 +05:30
Akash Manohar J
cdee09dec3
Cleanup readme
2014-11-30 15:48:49 +05:30
Akash Manohar J
1df29d6913
Use installs/<package>/<version> as installation dir
2014-11-30 15:25:26 +05:30
Akash Manohar J
879d8fa5f5
Use binary operators
2014-11-30 14:16:07 +05:30
Akash Manohar J
281aaf705d
Add support for installing versions like foo, tag:foo and commit:foo
2014-11-30 14:13:07 +05:30
Akash Manohar J
87b548a46d
Write version and hash to .versions file
2014-11-30 12:54:59 +05:30
Akash Manohar J
26c67bc32f
WIP: Attempting to install erlang 17.3.4 now
2014-11-30 11:32:57 +05:30
Akash Manohar J
32fe431ae6
WIP: erlang package
2014-11-30 00:01:37 +05:30
Akash Manohar J
d5f19e8bd0
Refactor
2014-11-29 21:58:11 +05:30
Akash Manohar J
f60eced156
Use erlang as an example source
2014-11-29 20:16:29 +05:30
Akash Manohar J
643d3419cb
Fix up functions; get list working
2014-11-29 16:54:02 +05:30
Akash Manohar J
12b420b908
Change expected commands
2014-11-29 10:12:29 +05:30
Akash Manohar J
efa1268689
Stubs
2014-10-19 21:49:40 +05:30
Akash Manohar J
2fe941fb4c
Docs for asdf
2014-10-01 15:37:33 +05:30
Akash Manohar J
0ff759a9be
Dir structure
2014-09-30 05:23:59 +05:30