Merge remote-tracking branch 'source/master' into origin/shellcheck

This commit is contained in:
Jonathan Knapp 2017-10-01 09:15:22 -04:00
commit 33d7d9c26c
No known key found for this signature in database
GPG Key ID: 51330F9D3F9D368E
9 changed files with 54 additions and 26 deletions

View File

@ -1,17 +1,21 @@
# Changelog
## 0.3.1-dev
## 0.4.1-dev
## 0.4.0
Features
* Add CONTRIBUTING guidelines and GitHub issue and pull request templates
* Add CONTRIBUTING guidelines and GitHub issue and pull request templates (#217)
* Add `plugin-list-all` command to list plugins from asdf-plugins repo. (#221)
* `asdf current` shows all current tool versions when given no args (#219)
* Add asdf-plugin-version metadata to shims (#212)
* Add release.sh script to automate release of new versions (#220)
Fixed Bugs
* Allow spaces on path containing the `.tool-versions` file (#224)
* Fixed bug in `--version` functionality so it works regardless of how asdf was installed (#198)
## 0.3.0

View File

@ -26,12 +26,12 @@ Travis CI.
## Did you create a plugin for asdf?
Please read the [creating plugins](doc/creating-plugins.md) guide.
Please read the [creating plugins](docs/creating-plugins.md) guide.
## Do you want to contribute the asdf documentation?
Documentation can always be improved! Right now there is just the
[README](README.md) and the [creating plugins](doc/creating-plugins.md) guide.
[README](README.md) and the [creating plugins](docs/creating-plugins.md) guide.
The [wiki](https://github.com/asdf-vm/asdf/wiki) exists but is in a state of
disrepair. If you see something that can be improved please submit a pull
request or edit the wiki.

View File

@ -8,7 +8,7 @@ Supported languages include Ruby, Node.js, Elixir and [more](https://github.com/
Copy-paste the following into command line:
```bash
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.3.0
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.4.0
```
Depending on your OS, run the following

1
VERSION Normal file
View File

@ -0,0 +1 @@
v0.4.0

View File

@ -18,25 +18,24 @@ end
function __fish_asdf_arg_number -a number
set -l cmd (commandline -opc)
test (count $cmd) -eq $number
test (count $cmd) -eq $number
end
function __fish_asdf_arg_at -a number
set -l cmd (commandline -opc)
echo $cmd[$number]
echo $cmd[$number]
end
set -l official_plugins ruby erlang nodejs elixir
# plugin-add completion
complete -f -c asdf -n '__fish_asdf_needs_command' -a plugin-add -d "Add git repo as plugin"
complete -f -c asdf -n '__fish_asdf_using_command plugin-add; and __fish_asdf_arg_number 2' -a (echo $official_plugins)
complete -f -c asdf -n '__fish_asdf_using_command plugin-add; and __fish_asdf_arg_number 3' -a '(echo https://github.com/asdf-vm/asdf-(__fish_asdf_arg_at 3).git)'
complete -f -c asdf -n '__fish_asdf_using_command plugin-add; and __fish_asdf_arg_number 2' -a '(asdf plugin-list-all)'
# plugin-list completion
complete -f -c asdf -n '__fish_asdf_needs_command' -a plugin-list -d "List installed plugins"
# plugin-list-all completion
complete -f -c asdf -n '__fish_asdf_needs_command' -a plugin-list-all -d "List all existing plugins"
# plugin-remove completion
complete -f -c asdf -n '__fish_asdf_needs_command' -a plugin-remove -d "Remove plugin and package versions"
complete -f -c asdf -n '__fish_asdf_using_command plugin-remove; and __fish_asdf_arg_number 2' -a '(asdf plugin-list)'

View File

@ -1,5 +1,6 @@
MANAGE PLUGINS
asdf plugin-add <name> [<git-url>] Add a plugin
asdf plugin-add <name> [<git-url>] Add a plugin from the plugin repo OR, add a Git repo
as a plugin by specifying the name and repo url
asdf plugin-list List installed plugins
asdf plugin-list-all List plugins registered on asdf-plugins repository
asdf plugin-remove <name> Remove plugin and package versions

View File

@ -6,6 +6,17 @@ update_command() {
(
cd "$(asdf_dir)" || exit 1
if [ -f asdf_updates_disabled ]; then
echo "Update command disabled. Please use the package manager that you used to install asdf to upgrade asdf."
else
do_update "$update_to_head"
fi
)
}
do_update() {
local update_to_head=$1
if [ "$update_to_head" = "--head" ]; then
# Update to latest on the master branch
git checkout master
@ -22,7 +33,6 @@ update_command() {
git checkout "$tag" || exit 1
echo "Updated asdf to release $tag"
fi
)
}
# stolen from https://github.com/rbenv/ruby-build/pull/631/files#diff-fdcfb8a18714b33b07529b7d02b54f1dR942

View File

@ -8,11 +8,7 @@ GREP_OPTIONS="--color=never"
GREP_COLORS=
asdf_version() {
# Move to the asdf repo, then report the current tag
(
cd "$(asdf_dir)" || exit
git describe --tags
)
cat "$(asdf_dir)/VERSION"
}
asdf_dir() {
@ -25,6 +21,10 @@ asdf_dir() {
echo "$ASDF_DIR"
}
asdf_repository_url() {
echo "https://github.com/asdf-vm/asdf-plugins.git"
}
get_install_path() {
local plugin=$1
local install_type=$2
@ -284,10 +284,6 @@ get_asdf_config_value() {
fi
}
asdf_repository_url() {
echo "https://github.com/asdf-vm/asdf-plugins.git"
}
repository_needs_update() {
local update_file_dir
update_file_dir="$(asdf_dir)/tmp"

View File

@ -18,6 +18,23 @@ This script updates the hardcoded versions in the source code and README and
then commits them on the current branch. It then tags that commit with the
specified version.
If you run this script in error, or with the wrong version, you can undo the
changes by finding the original state in the list of actions listed in the
reflog:
git reflog
Then revert to the original state by running `git checkout` with the reference
previous to the release tagging changes:
git checkout HEAD@{21}
Then checkout the original branch again:
git checkout master
You are back to the original state!
EOF
}
@ -67,14 +84,14 @@ fi
# Update version in README
sed -i.bak "s|^\(git clone.*--branch \).*$|\1$new_tag_name|" README.md
# Update version in utils.sh
# TODO: Hardcode version until.sh since not all asdf will include the Git repo
# Update version in the VERSION file
echo "$new_tag_name" > VERSION
echo "INFO: Committing and tagging new version"
# Commit the changed files before tagging the new release
git add README.md
git add lib/utils.sh
git add VERSION
git commit -m "Update version to $new_version"
git tag -a "$new_tag_name" -m "Version ${new_version}"