2014-12-18 12:08:02 -07:00
|
|
|
# asdf
|
|
|
|
### _extendable version manager_
|
2014-09-29 09:51:09 -07:00
|
|
|
|
2015-05-11 10:33:05 -07:00
|
|
|
> I've built plugins to support the following languages:
|
2015-05-17 18:25:35 -07:00
|
|
|
> * [Ruby](https://github.com/HashNuke/asdf-ruby)
|
2014-12-21 06:13:42 -07:00
|
|
|
> * [Erlang](https://github.com/HashNuke/asdf-erlang)
|
|
|
|
> * [Elixir](https://github.com/HashNuke/asdf-elixir)
|
2014-12-20 07:16:14 -07:00
|
|
|
>
|
2015-05-17 18:25:35 -07:00
|
|
|
> There is a [super-simple API](https://github.com/HashNuke/asdf/blob/master/docs/creating-plugins.md) for supporting more languages.
|
2014-11-30 06:46:11 -07:00
|
|
|
|
2014-12-20 07:16:14 -07:00
|
|
|
---
|
2014-11-30 06:46:11 -07:00
|
|
|
|
2015-05-11 10:36:25 -07:00
|
|
|
## SETUP
|
2014-11-30 06:46:11 -07:00
|
|
|
|
2014-11-30 20:32:14 -07:00
|
|
|
Copy-paste the following into command line:
|
2014-11-30 06:46:11 -07:00
|
|
|
|
2015-05-11 10:33:05 -07:00
|
|
|
```bash
|
2014-11-30 20:32:14 -07:00
|
|
|
git clone https://github.com/HashNuke/asdf.git ~/.asdf
|
2015-05-10 09:51:33 -07:00
|
|
|
|
2015-05-11 10:33:05 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
Depending on your OS, run the following
|
|
|
|
```bash
|
2015-05-10 09:51:33 -07:00
|
|
|
# For Ubuntu or other linux distros
|
|
|
|
echo 'source $HOME/.asdf/asdf.sh' >> ~/.bashrc
|
|
|
|
|
|
|
|
# OR for Max OSX
|
|
|
|
echo 'source $HOME/.asdf/asdf.sh' >> ~/.bash_profile
|
2014-11-30 06:46:11 -07:00
|
|
|
```
|
|
|
|
|
2015-05-18 22:08:42 -07:00
|
|
|
If you use zsh or any other shell, replace `.bashrc` with the config file for the respective shell.
|
|
|
|
|
|
|
|
> For most plugins, it is good if you have installed the following packages OR their equivalent on you OS
|
|
|
|
|
2015-05-19 01:52:55 -07:00
|
|
|
> * **OS X**: Install these via homebrew `automake autoconf openssl libyaml readline ncurses libxslt libtool unixodbc`
|
|
|
|
> * **Ubuntu**: `automake autoconf libreadline-dev libncurses-dev libssl-dev libyaml-dev libxslt-dev libffi-dev libtool unixodbc-dev`
|
2014-11-30 06:46:11 -07:00
|
|
|
|
2015-05-10 09:51:33 -07:00
|
|
|
**That's all ~! You are ready to use asdf**
|
2014-11-30 20:32:14 -07:00
|
|
|
|
2015-05-11 10:36:25 -07:00
|
|
|
-----------------------
|
2014-11-30 20:32:14 -07:00
|
|
|
|
2015-05-11 10:36:25 -07:00
|
|
|
## USAGE
|
|
|
|
|
2015-05-17 18:25:35 -07:00
|
|
|
### Manage plugins
|
2014-11-30 20:32:14 -07:00
|
|
|
|
2015-05-17 18:25:35 -07:00
|
|
|
Plugins are how asdf understands how to handle different packages.
|
2014-11-30 06:46:11 -07:00
|
|
|
|
|
|
|
|
2015-05-17 18:25:35 -07:00
|
|
|
##### Add a plugin
|
2014-11-30 20:32:14 -07:00
|
|
|
|
|
|
|
```bash
|
2015-05-17 18:25:35 -07:00
|
|
|
asdf plugin-add <name> <git-url>
|
|
|
|
# asdf plugin-add erlang https://github.com/HashNuke/asdf-erlang.git
|
2014-11-30 06:46:11 -07:00
|
|
|
```
|
2014-11-30 20:32:14 -07:00
|
|
|
|
2015-05-17 18:25:35 -07:00
|
|
|
##### Remove a plugin
|
2014-11-30 20:32:14 -07:00
|
|
|
|
|
|
|
```bash
|
2015-05-17 18:25:35 -07:00
|
|
|
asdf plugin-remove <name>
|
|
|
|
# asdf plugin-remove erlang
|
2014-11-30 06:46:11 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
2015-05-17 18:25:35 -07:00
|
|
|
##### Update plugins
|
2014-11-30 06:46:11 -07:00
|
|
|
|
2014-11-30 20:32:14 -07:00
|
|
|
```bash
|
2015-05-17 18:25:35 -07:00
|
|
|
asdf plugin-update --all
|
2014-11-30 06:46:11 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
If you want to update a specific package, just say so.
|
|
|
|
|
2014-11-30 20:32:14 -07:00
|
|
|
```bash
|
2015-05-17 18:25:35 -07:00
|
|
|
asdf plugin-update <name>
|
|
|
|
# asdf plugin-update erlang
|
2014-11-30 06:46:11 -07:00
|
|
|
```
|
|
|
|
|
2015-05-17 18:25:35 -07:00
|
|
|
### Manage versions
|
2014-11-30 06:46:11 -07:00
|
|
|
|
2014-11-30 20:32:14 -07:00
|
|
|
```bash
|
2015-05-11 10:33:05 -07:00
|
|
|
asdf install <name> <version>
|
|
|
|
# asdf install erlang 17.3
|
2014-11-30 06:46:11 -07:00
|
|
|
|
2015-05-11 10:33:05 -07:00
|
|
|
asdf uninstall <name> <version>
|
|
|
|
# asdf uninstall erlang 17.3
|
2014-11-30 06:46:11 -07:00
|
|
|
```
|
|
|
|
|
2015-05-11 10:36:25 -07:00
|
|
|
##### Lists installed versions
|
2014-11-30 06:46:11 -07:00
|
|
|
|
2014-11-30 20:32:14 -07:00
|
|
|
```bash
|
2015-05-11 10:33:05 -07:00
|
|
|
asdf list <name>
|
|
|
|
# asdf list erlang
|
2014-11-30 06:46:11 -07:00
|
|
|
```
|
|
|
|
|
2015-05-11 10:36:25 -07:00
|
|
|
##### List all available versions
|
2014-11-30 06:46:11 -07:00
|
|
|
|
2014-11-30 20:32:14 -07:00
|
|
|
```bash
|
2015-05-11 10:33:05 -07:00
|
|
|
asdf list-all <name>
|
|
|
|
# asdf list-all erlang
|
2014-11-30 06:46:11 -07:00
|
|
|
```
|
|
|
|
|
2015-05-11 10:36:25 -07:00
|
|
|
##### Use a specific version of a package
|
2014-11-30 06:46:11 -07:00
|
|
|
|
2014-11-30 20:32:14 -07:00
|
|
|
```bash
|
2015-05-11 10:33:05 -07:00
|
|
|
asdf use <name> <version>
|
2015-05-17 18:31:24 -07:00
|
|
|
# asdf use erlang 17.5
|
2014-11-30 06:46:11 -07:00
|
|
|
```
|
|
|
|
|
2015-05-17 18:31:24 -07:00
|
|
|
This will set the requested version of the package for the current terminal session.
|
2014-11-30 03:18:49 -07:00
|
|
|
|
2015-05-17 18:25:35 -07:00
|
|
|
## The `.tool-versions` file
|
2014-11-30 06:46:11 -07:00
|
|
|
|
2015-05-17 18:25:35 -07:00
|
|
|
Add a `.tool-versions` file to your project dir and versions of those packages will be used.
|
2014-10-19 09:18:48 -07:00
|
|
|
|
|
|
|
```
|
2014-11-30 06:46:11 -07:00
|
|
|
elixir 1.0.2
|
2014-10-19 09:18:48 -07:00
|
|
|
erlang 17.3
|
|
|
|
```
|
|
|
|
|
2014-11-30 06:46:11 -07:00
|
|
|
## Credits
|
2014-10-19 09:18:48 -07:00
|
|
|
|
2014-12-20 07:05:56 -07:00
|
|
|
Me ([@HashNuke](http://github.com/HashNuke)), High-fever, cold, cough.
|
2014-10-19 09:18:48 -07:00
|
|
|
|
2014-11-30 06:46:11 -07:00
|
|
|
Copyright 2014 to the end of time
|
2014-12-20 07:05:56 -07:00
|
|
|
|
|
|
|
-------
|
|
|
|
|
2015-05-17 18:25:35 -07:00
|
|
|
Read the [ballad](https://github.com/HashNuke/asdf/blob/master/ballad-of-asdf.md).
|