From dcd651de41e1a1adfec4d1266dc8f6862ae5f801 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 19:05:55 -0400 Subject: [PATCH 01/24] Add the easy instructions to the README and place for troubleshooting --- README.md | 74 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 45 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 3ab4dee..e27c597 100644 --- a/README.md +++ b/README.md @@ -34,47 +34,39 @@ itself in a few ways: their dependencies. How you install different versions of commands is entirely up to you. -## Installation +## Install -1. Install the `alt` binary. +### Debian / Ubuntu / Anything using DEBs - ```sh - curl -sL https://github.com/dotboris/alt/raw/master/install.sh | bash -s - ``` - -1. Add the `alt` shims directory to the top of your `PATH`. - This lets `alt` change command versions. - - For BASH: +1. Open the [latest release page on Github][latest-release] +1. Download the `.deb` file matching your architecture +1. Install the `.deb` file by double clicking on it +1. OR Install the `.deb` file from the command line ```sh - echo 'export PATH="$HOME/.local/alt/shims:$PATH"' >> ~/.bashrc - export PATH="$HOME/.local/alt/shims:$PATH" + sudo apt install path/to/alt.deb ``` - For ZSH: +Note: You will probably need to log out & log back in to your user for `alt` to +finish being configured. - ```sh - echo 'export PATH="$HOME/.local/alt/shims:$PATH"' >> ~/.zshrc - export PATH="$HOME/.local/alt/shims:$PATH" - ``` +### OSX (Homebrew & Linuxbrew) - For FISH: +```sh +brew tap dotboris/alt +brew install alt-bin +``` - ```sh - echo 'set -x PATH "$HOME/.local/alt/shims" $PATH' >> ~/.config/fish/config.fish - set -x PATH "$HOME/.local/alt/shims" $PATH - ``` +Pay close attention to the "Caveats" messages as you'll need to add a line to +your `~/.bashrc` / `~/.zshrc` files. + +### Pre-packaged binaries -1. (Optional) Add `.alt.toml` to your global gitignore file. +TODO - During it's operation, `alt` puts a file named `.alt.toml` in the current - directory. These files don't belong in git repositories. To avoid getting - those files all over your git repositories, you can add them to a global - gitignore file. +### From source - If you don't know how to create a global gitignore file, see: - https://help.github.com/articles/ignoring-files/#create-a-global-gitignore +TODO ## Usage @@ -155,6 +147,28 @@ The above command will show you: - The versions of those commands available - The versions being used in the current directory +## Troubleshooting + +### Warning about shims directory not being in `PATH` + +TODO: Try logging out / logging back in +TODO: Try sourcing `/etc/profile.d/alt.sh` + +### Git always see a `.alt.toml` file + +TODO: Does this belong here or should it be higher up? + +During it's normal operation, `alt` puts a file named `.alt.toml` in the current +directory. __You should not commit `.alt.toml`.__ To avoid getting those files +all over your git repositories, you can add them to a global gitignore file. + +If you don't know how to create a global gitignore file, see: +https://help.github.com/articles/ignoring-files/#create-a-global-gitignore + +```sh +echo '.alt.toml' >> path/to/your/global-gitgnore +``` + ## Development ### Setup @@ -172,3 +186,5 @@ cargo run ... ```sh cargo test ``` + +[latest-release]: https://github.com/dotboris/alt/releases/latest From 2d9a9c67f4908fa3383c66a2ef942bb48e9e5c20 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 19:09:52 -0400 Subject: [PATCH 02/24] Stop packaging a bin-in-gzip package We're moving away from that, so we'll just ditch it --- ci/package.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/ci/package.py b/ci/package.py index d24f230..d2fb166 100755 --- a/ci/package.py +++ b/ci/package.py @@ -47,21 +47,6 @@ def build_deb(rust_target, dest_dir): sh('cargo', 'deb', '--target', rust_target, '-o', dest_dir, '--', '--locked') -def build_gzip_bin(bin_path, version, rust_target, dest_dir): - step('Packinging {0} as a gzipped binary'.format(bin_path)) - work_dir = mkdtemp() - - to_gzip_file = path.join(work_dir, 'alt') - copy(bin_path, to_gzip_file) - sh('gzip', '-fk9', to_gzip_file) - move( - '{}.gz'.format(to_gzip_file), - path.join(dest_dir, 'alt_v{0}_{1}.gz'.format(version, rust_target)) - ) - - rmtree(work_dir) - - def build_tarbal(bin_path, version, rust_target, dest_dir): dest_file_name = 'alt_v{0}_{1}.tar.gz'.format(version, rust_target) step('Packinging {}'.format(dest_file_name)) @@ -136,8 +121,6 @@ def main( build_tarbal(alt_bin, version, rust_target, dest_dir) - build_gzip_bin(alt_bin, version, rust_target, dest_dir) - if is_platform('linux'): build_deb(rust_target, dest_dir) From 9552ba737ee60ef78dc6911dd075618b75134d6c Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 19:17:52 -0400 Subject: [PATCH 03/24] Replace install script with warning pointing to doc --- install.sh | 74 +++++++----------------------------------------------- 1 file changed, 9 insertions(+), 65 deletions(-) diff --git a/install.sh b/install.sh index 3d06970..d9430a1 100755 --- a/install.sh +++ b/install.sh @@ -1,70 +1,14 @@ #!/bin/bash set -e -o pipefail -get_latest_version() { - curl -s --head https://github.com/dotboris/alt/releases/latest \ - | grep '^Location' \ - | grep -Eo 'v[0-9]+(\.[0-9]+)+' -} +# We are leaving this script in place so that old guides / documentation will +# point users to the new ways of installing alt. This is a much better +# alternative than having users get a 404 and passing that to bash so that it +# gets evaluated. -get_std_arch() { - local _arch - _arch="$(uname -m)" - - case "$_arch" in - i386|i686) printf 'i686';; - *) printf '%s' "$_arch";; - esac -} - -get_target() { - local _arch - _arch="$(get_std_arch)" - local _os - _os="$(uname -s | tr '[:upper:]' '[:lower:]')" - - case "$_os-$_arch" in - linux-x86_64) printf 'x86_64-unknown-linux-musl';; - darwin-x86_64) printf 'x86_64-apple-darwin';; - *) - echo "Unsupported OS/Arch $_os/$_arch. Try building from source." - return 1 - ;; - esac -} - -version="$(get_latest_version)" -target="$(get_target)" - -echo "Installing alt $version for $target as /usr/local/bin/alt" -echo "You may be prompted for your password" - -file_name="alt_${version}_${target}.gz" -url="https://github.com/dotboris/alt/releases/download/$version/$file_name" - -sudo bash -e -o pipefail -s <> ~/.bashrc' -echo $' export PATH="$HOME/.local/alt/shims:$PATH"' -echo -echo 'ZSH:' -echo $' echo \'export PATH="$HOME/.local/alt/shims:$PATH"\' >> ~/.zshrc' -echo $' export PATH="$HOME/.local/alt/shims:$PATH"' -echo -echo 'FISH:' -echo $' echo \'set -x PATH "$HOME/.local/alt/shims" $PATH\' >> ~/.config/fish/config.fish' -echo $' set -x PATH "$HOME/.local/alt/shims" $PATH' -echo +echo '👋 Hi there!' +echo 'alt no longer supports this installation method' +echo 'For alternate installation instructions, please see:' +echo ' https://github.com/dotboris/alt#install' +exit 1 From d8a697aa07ca8519a33cf7bc08fd51e190027436 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 19:36:38 -0400 Subject: [PATCH 04/24] Point shim dir in path warning to troubleshooting --- src/checks.rs | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/src/checks.rs b/src/checks.rs index bc9ed10..629ec10 100644 --- a/src/checks.rs +++ b/src/checks.rs @@ -26,7 +26,7 @@ fn line_label(width: usize, label: &str) -> String { } pub fn check_shim_in_path() { - let path = env::var("PATH").unwrap(); + let path = env::var("PATH").unwrap_or_default(); let mut parts = env::split_paths(&path); let shim_dir = config::shim_dir(); @@ -38,22 +38,32 @@ pub fn check_shim_in_path() { let shim_dir = style(shim_dir).cyan(); let path_env_var = style("PATH").cyan(); - eprintln!("{}", line_label(term_width as usize, "WARNING")); - eprintln!("Alt is not installed corrected and will not work!"); - eprintln!(); eprintln!( - "You are seeing the warning because the shim directory ({}) is not in your {} environment variable.", - shim_dir, - path_env_var - ); - eprintln!(); - eprintln!("Please add {} to your {} environment variable.", shim_dir, path_env_var); - eprintln!(); - eprintln!( - "Alternatively, see {} for setup instructions.", - style("https://github.com/dotboris/alt#installation").cyan() + "\ +{warning_line} +Alt is not configured corrected and will not work! + +You are seeing the warning because the shim directory ({shim_dir}) is not in \ +your {path_env_var} environment variable. + +Normally, alt should configure this automatically during the install process. +In come cases you may need to: + +- {reopen_terminal} +- {relogin} + +If the problem persists, please see: + {troubleshooting_link} +{bottom_line} + +", + warning_line=line_label(term_width as usize, "WARNING"), + bottom_line=line(term_width as usize), + shim_dir=shim_dir, + path_env_var=path_env_var, + reopen_terminal=style("re-open your terminal").bold(), + relogin=style("log out and log back into your user session").bold(), + troubleshooting_link=style("https://github.com/dotboris/alt#troubleshooting").cyan() ); - eprintln!("{}", line(term_width as usize)); - eprintln!(); } } From 3cee0102768f0c6132c7437602d45158b762b552 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:19:45 -0400 Subject: [PATCH 05/24] Fill out troubleshooting for path issues --- README.md | 31 +++++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e27c597..f98cb00 100644 --- a/README.md +++ b/README.md @@ -151,12 +151,35 @@ The above command will show you: ### Warning about shims directory not being in `PATH` -TODO: Try logging out / logging back in -TODO: Try sourcing `/etc/profile.d/alt.sh` +Behind the scenes, `alt` manages a directory of "shims" +(`$HOME/.local/alt/shims`). In order to switch the version of commands, it needs +that directory to be at the top of your `PATH` environment variable. -### Git always see a `.alt.toml` file +During the install process, we install scripts that configures this +automatically for you. These scripts are `/etc/profile.d/alt.sh` & +`/etc/fish/conf.d/alt.fish` (the location of these scripts may vary on some +platforms). -TODO: Does this belong here or should it be higher up? +In some cases, you may need to force these scripts to re-load. You can try the following steps: + +1. Close & re-open your terminal +1. Log out of your desktop session & log back in again + +If either or both of these fail, you can put the shim directory on top of your +`PATH` manually. This will vary depending on what shell you use. + +```sh +# For BASH +echo 'export PATH="$HOME/.local/alt/shims:$PATH"' >> ~/.bashrc + +# For ZSH +echo 'export PATH="$HOME/.local/alt/shims:$PATH"' >> ~/.zshrc + +# For FISH +echo 'set -gx PATH "$HOME/.local/alt/shims" $PATH' >> ~/.config/fish/config.fish +``` + +### `.alt.toml` file in git repositories During it's normal operation, `alt` puts a file named `.alt.toml` in the current directory. __You should not commit `.alt.toml`.__ To avoid getting those files From 00a69a80e89eee17ddc698f7f5d028ed3d29d2a2 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:20:51 -0400 Subject: [PATCH 06/24] Remove useless NOTE: bit --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f98cb00..46daea7 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ itself in a few ways: sudo apt install path/to/alt.deb ``` -Note: You will probably need to log out & log back in to your user for `alt` to -finish being configured. +You will probably need to log out & log back in to your user for `alt` to finish +being configured. ### OSX (Homebrew & Linuxbrew) From e299ba9b17dbab0f00d85fd4fecd7f7a5c846404 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:33:20 -0400 Subject: [PATCH 07/24] Add instructions to install pre-packaged bins --- README.md | 4 +-- doc/install-pre-packaged-bins.md | 42 ++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) create mode 100644 doc/install-pre-packaged-bins.md diff --git a/README.md b/README.md index 46daea7..8db72ab 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ itself in a few ways: ### Debian / Ubuntu / Anything using DEBs 1. Open the [latest release page on Github][latest-release] -1. Download the `.deb` file matching your architecture +1. Download the `.deb` file matching your system architecture 1. Install the `.deb` file by double clicking on it 1. OR Install the `.deb` file from the command line @@ -62,7 +62,7 @@ your `~/.bashrc` / `~/.zshrc` files. ### Pre-packaged binaries -TODO +See: [doc/install-prepackaged-bins.md] ### From source diff --git a/doc/install-pre-packaged-bins.md b/doc/install-pre-packaged-bins.md new file mode 100644 index 0000000..404abc2 --- /dev/null +++ b/doc/install-pre-packaged-bins.md @@ -0,0 +1,42 @@ +# Install Pre-packaged Binaries + +Note that the following instructions assume a farly "normal" file system setup. +You may need to adjust some of the paths here to match your system. + +1. Open the [latest release page on Github][latest-release] +1. Open the `.tar.gz` file that matches your system architecture +1. Extract the `.tar.gz` file + + Before to replace `{version}` & `{system}` to match the file you downloaded. + + ```sh + tar xvzf alt_{version}_{system}.tar.gz + cd alt_{version}_{system} + ``` + +1. Install the `alt` binary + + ```sh + sudo cp bin/alt /usr/local/bin/alt + ``` + +1. Install the `PATH` configuration scripts + + ```sh + sudo cp etc/profile.d/alt.sh /etc/profile.d/alt.sh + # (Optional) if you use fish + sudo cp etc/fish/conf.d/alt.fish /etc/fish/conf.d/alt.fish + ``` + +1. (Optional) Install the completions + + ```sh + # If you use BASH + sudo cp completion/alt.bash /etc/bash_completion.d/alt.bash + # If you use ZSH + sudo cp completion/_alt /usr/share/zsh/site-functions/_alt + # If you use FISH + sudo cp completion/alt.fish /etc/fish/completions/alt.fish + ``` + +[latest-release]: https://github.com/dotboris/alt/releases/latest From 5040e647e75db2c19bcf2c5838b184a13739a8fc Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:34:47 -0400 Subject: [PATCH 08/24] Fix pre-packaged bins link --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8db72ab..113337e 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ your `~/.bashrc` / `~/.zshrc` files. ### Pre-packaged binaries -See: [doc/install-prepackaged-bins.md] +See: [doc/install-pre-packaged-bins.md](./doc/install-pre-packaged-bins.md) ### From source From 8f20bc86d388b6b9f3199ab79caad15a12c1d9c4 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:35:35 -0400 Subject: [PATCH 09/24] Fix typos --- doc/install-pre-packaged-bins.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/install-pre-packaged-bins.md b/doc/install-pre-packaged-bins.md index 404abc2..65f2a47 100644 --- a/doc/install-pre-packaged-bins.md +++ b/doc/install-pre-packaged-bins.md @@ -1,6 +1,6 @@ # Install Pre-packaged Binaries -Note that the following instructions assume a farly "normal" file system setup. +Note that the following instructions assume a fairly "normal" file system. You may need to adjust some of the paths here to match your system. 1. Open the [latest release page on Github][latest-release] From 695e63be893b036de3914bb30425c7545681430e Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:44:21 -0400 Subject: [PATCH 10/24] Add from source doc --- README.md | 2 +- doc/install-from-source.md | 53 ++++++++++++++++++++++++++++++++ doc/install-pre-packaged-bins.md | 5 +-- 3 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 doc/install-from-source.md diff --git a/README.md b/README.md index 113337e..06362eb 100644 --- a/README.md +++ b/README.md @@ -66,7 +66,7 @@ See: [doc/install-pre-packaged-bins.md](./doc/install-pre-packaged-bins.md) ### From source -TODO +See: [doc/install-from-source.md](./doc/install-from-source.md) ## Usage diff --git a/doc/install-from-source.md b/doc/install-from-source.md new file mode 100644 index 0000000..f60492a --- /dev/null +++ b/doc/install-from-source.md @@ -0,0 +1,53 @@ +# Install from Source + +1. Open the [latest release page on Github][latest-release] +1. Download the source `.tar.gz` file +1. Install the Rust compiler + + This can be done through your distributions' package manager. Note that the + version of rust packaged by some distributions may be fairly out of date. + + I recommend installing rust with . + +1. Extract the source code + + Before you run this, be sure to replace `{version}` to match the file you + downloaded. + + ```sh + tar xvzf {version}.tar.gz + cd alt-{version} + ``` + +1. Compile `alt` (This will take a while) + + ```sh + cargo build --release --locked + ``` + +1. Install the `alt` binary + + ```sh + sudo cp target/release/alt /usr/local/bin/alt + ``` + +1. Install the `PATH` configuration scripts + + ```sh + sudo cp etc/profile.d/alt.sh /etc/profile.d/alt.sh + # (Optional) if you use fish + sudo cp etc/fish/conf.d/alt.fish /etc/fish/conf.d/alt.fish + ``` + +1. (Optional) Install the completions + + ```sh + # If you use BASH + sudo cp target/release/completion/alt.bash /etc/bash_completion.d/alt.bash + # If you use ZSH + sudo cp target/release/completion/_alt /usr/share/zsh/site-functions/_alt + # If you use FISH + sudo cp target/release/completion/alt.fish /etc/fish/completions/alt.fish + ``` + +[latest-release]: https://github.com/dotboris/alt/releases/latest diff --git a/doc/install-pre-packaged-bins.md b/doc/install-pre-packaged-bins.md index 65f2a47..ae2df15 100644 --- a/doc/install-pre-packaged-bins.md +++ b/doc/install-pre-packaged-bins.md @@ -4,10 +4,11 @@ Note that the following instructions assume a fairly "normal" file system. You may need to adjust some of the paths here to match your system. 1. Open the [latest release page on Github][latest-release] -1. Open the `.tar.gz` file that matches your system architecture +1. Download the `.tar.gz` file that matches your system architecture 1. Extract the `.tar.gz` file - Before to replace `{version}` & `{system}` to match the file you downloaded. + Before you run this, be sure to replace `{version}` & `{system}` to match + the file you downloaded. ```sh tar xvzf alt_{version}_{system}.tar.gz From 3ff915c92e3e290e0950c3440dd6d9935fd55024 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:45:45 -0400 Subject: [PATCH 11/24] Add mentions about re-logging --- doc/install-from-source.md | 3 +++ doc/install-pre-packaged-bins.md | 3 +++ 2 files changed, 6 insertions(+) diff --git a/doc/install-from-source.md b/doc/install-from-source.md index f60492a..cdb20d9 100644 --- a/doc/install-from-source.md +++ b/doc/install-from-source.md @@ -50,4 +50,7 @@ sudo cp target/release/completion/alt.fish /etc/fish/completions/alt.fish ``` +You will probably need to log out & log back in to your user so that the `PATH` +configuration scripts you install will load. + [latest-release]: https://github.com/dotboris/alt/releases/latest diff --git a/doc/install-pre-packaged-bins.md b/doc/install-pre-packaged-bins.md index ae2df15..28f5391 100644 --- a/doc/install-pre-packaged-bins.md +++ b/doc/install-pre-packaged-bins.md @@ -40,4 +40,7 @@ You may need to adjust some of the paths here to match your system. sudo cp completion/alt.fish /etc/fish/completions/alt.fish ``` +You will probably need to log out & log back in to your user so that the `PATH` +configuration scripts you install will load. + [latest-release]: https://github.com/dotboris/alt/releases/latest From 95f4afdf6342bdd9d33c2b28a96f9af352450007 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:47:34 -0400 Subject: [PATCH 12/24] Fix typos --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 06362eb..86354c1 100644 --- a/README.md +++ b/README.md @@ -155,12 +155,13 @@ Behind the scenes, `alt` manages a directory of "shims" (`$HOME/.local/alt/shims`). In order to switch the version of commands, it needs that directory to be at the top of your `PATH` environment variable. -During the install process, we install scripts that configures this +During the install process, we install scripts that configure this automatically for you. These scripts are `/etc/profile.d/alt.sh` & `/etc/fish/conf.d/alt.fish` (the location of these scripts may vary on some platforms). -In some cases, you may need to force these scripts to re-load. You can try the following steps: +In some cases, you may need to force these scripts to re-load. You can try the +following steps: 1. Close & re-open your terminal 1. Log out of your desktop session & log back in again From 37e439ba4acdc12b054612c364573939b429c8b1 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:48:04 -0400 Subject: [PATCH 13/24] clarify that `.alt.toml` should be be commited to VCS --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 86354c1..321417d 100644 --- a/README.md +++ b/README.md @@ -183,8 +183,9 @@ echo 'set -gx PATH "$HOME/.local/alt/shims" $PATH' >> ~/.config/fish/config.fish ### `.alt.toml` file in git repositories During it's normal operation, `alt` puts a file named `.alt.toml` in the current -directory. __You should not commit `.alt.toml`.__ To avoid getting those files -all over your git repositories, you can add them to a global gitignore file. +directory. __You should not commit `.alt.toml` to git or any other VCS.__ To +avoid getting those files all over your git repositories, you can add them to a +global gitignore file. If you don't know how to create a global gitignore file, see: https://help.github.com/articles/ignoring-files/#create-a-global-gitignore From 4b36a00bf29284939c38b0858aa5e9ebe71ac19a Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:49:46 -0400 Subject: [PATCH 14/24] Update ref to rust install instructions --- README.md | 2 +- doc/install-from-source.md | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 321417d..f4a522b 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ echo '.alt.toml' >> path/to/your/global-gitgnore ### Setup -See: https://doc.rust-lang.org/book/second-edition/ch01-01-installation.html +See: ### Run diff --git a/doc/install-from-source.md b/doc/install-from-source.md index cdb20d9..e91602b 100644 --- a/doc/install-from-source.md +++ b/doc/install-from-source.md @@ -4,10 +4,7 @@ 1. Download the source `.tar.gz` file 1. Install the Rust compiler - This can be done through your distributions' package manager. Note that the - version of rust packaged by some distributions may be fairly out of date. - - I recommend installing rust with . + See: 1. Extract the source code From ad8ff8e8a86b090d0d7969f8eeb98f04132f1b73 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:50:38 -0400 Subject: [PATCH 15/24] Change the ref yet again --- README.md | 2 +- doc/install-from-source.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f4a522b..c818003 100644 --- a/README.md +++ b/README.md @@ -198,7 +198,7 @@ echo '.alt.toml' >> path/to/your/global-gitgnore ### Setup -See: +See: ### Run diff --git a/doc/install-from-source.md b/doc/install-from-source.md index e91602b..14eec69 100644 --- a/doc/install-from-source.md +++ b/doc/install-from-source.md @@ -4,7 +4,7 @@ 1. Download the source `.tar.gz` file 1. Install the Rust compiler - See: + See: 1. Extract the source code From a3fafb672720757b82e9494594861b7abedd5a9b Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:54:48 -0400 Subject: [PATCH 16/24] Fix blurb in manual install about relogging --- doc/install-from-source.md | 4 ++-- doc/install-pre-packaged-bins.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/install-from-source.md b/doc/install-from-source.md index 14eec69..1222004 100644 --- a/doc/install-from-source.md +++ b/doc/install-from-source.md @@ -47,7 +47,7 @@ sudo cp target/release/completion/alt.fish /etc/fish/completions/alt.fish ``` -You will probably need to log out & log back in to your user so that the `PATH` -configuration scripts you install will load. +You will probably need to log out & log back in to your desktop session so that +the `PATH` configuration scripts you installed will load. [latest-release]: https://github.com/dotboris/alt/releases/latest diff --git a/doc/install-pre-packaged-bins.md b/doc/install-pre-packaged-bins.md index 28f5391..1c1ad0e 100644 --- a/doc/install-pre-packaged-bins.md +++ b/doc/install-pre-packaged-bins.md @@ -40,7 +40,7 @@ You may need to adjust some of the paths here to match your system. sudo cp completion/alt.fish /etc/fish/completions/alt.fish ``` -You will probably need to log out & log back in to your user so that the `PATH` -configuration scripts you install will load. +You will probably need to log out & log back in to your desktop session so that +the `PATH` configuration scripts you installed will load. [latest-release]: https://github.com/dotboris/alt/releases/latest From dfbce13c0a98bb334c78b21643cbf27fd708737b Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:55:19 -0400 Subject: [PATCH 17/24] Add note about "normal" fs in source install --- doc/install-from-source.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/install-from-source.md b/doc/install-from-source.md index 1222004..ed77633 100644 --- a/doc/install-from-source.md +++ b/doc/install-from-source.md @@ -1,5 +1,8 @@ # Install from Source +Note that the following instructions assume a fairly "normal" file system. You +may need to adjust some of the paths here to match your system. + 1. Open the [latest release page on Github][latest-release] 1. Download the source `.tar.gz` file 1. Install the Rust compiler From 877a5b4a9811552a4324cf145d22023e3db69b9a Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 20:57:38 -0400 Subject: [PATCH 18/24] Clarify relogging being about desktop sessions --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c818003..d2097d2 100644 --- a/README.md +++ b/README.md @@ -47,8 +47,8 @@ itself in a few ways: sudo apt install path/to/alt.deb ``` -You will probably need to log out & log back in to your user for `alt` to finish -being configured. +You will probably need to log out & log back in to your desktop session for +`alt` to be configured. ### OSX (Homebrew & Linuxbrew) From ed1aa7f8bab2f44a51a3c69183f16657c42265b5 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 21:35:02 -0400 Subject: [PATCH 19/24] Use `./` with apt install to ensure it picks up file --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d2097d2..1dc5140 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ itself in a few ways: 1. OR Install the `.deb` file from the command line ```sh - sudo apt install path/to/alt.deb + sudo apt install ./path/to/alt.deb ``` You will probably need to log out & log back in to your desktop session for From d548893bd0ec4a1832bf0b3cc3afc9a61b566aaa Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Tue, 3 Sep 2019 22:21:00 -0400 Subject: [PATCH 20/24] Add homebrew formula update to release instructions --- RELEASING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RELEASING.md b/RELEASING.md index 3baa50f..c4c9a8f 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -27,3 +27,5 @@ ``` 1. Travis CI will build the release and push it to github +1. Wait for Travis CI to finish building & pushing the artifacts +1. Update the Homebrew formula in From a955f2eceafaf8a953e88150273e1df58e494f3c Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Sun, 29 Sep 2019 15:46:32 -0400 Subject: [PATCH 21/24] Update src/checks.rs Co-Authored-By: Annie-Claude Morin --- src/checks.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/checks.rs b/src/checks.rs index 629ec10..b1fc9df 100644 --- a/src/checks.rs +++ b/src/checks.rs @@ -41,7 +41,7 @@ pub fn check_shim_in_path() { eprintln!( "\ {warning_line} -Alt is not configured corrected and will not work! +Alt is not configured correctly and will not work! You are seeing the warning because the shim directory ({shim_dir}) is not in \ your {path_env_var} environment variable. From ef59a879e19bc4feafdcbb13a1776b4462fe7550 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Sun, 29 Sep 2019 15:46:43 -0400 Subject: [PATCH 22/24] Update src/checks.rs Co-Authored-By: Annie-Claude Morin --- src/checks.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/checks.rs b/src/checks.rs index b1fc9df..d1000e7 100644 --- a/src/checks.rs +++ b/src/checks.rs @@ -43,7 +43,7 @@ pub fn check_shim_in_path() { {warning_line} Alt is not configured correctly and will not work! -You are seeing the warning because the shim directory ({shim_dir}) is not in \ +You are seeing this warning because the shim directory ({shim_dir}) is not in \ your {path_env_var} environment variable. Normally, alt should configure this automatically during the install process. From 38bdb9e5f3b7e80e3eba0a1d086035c787817af9 Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Sun, 29 Sep 2019 15:46:50 -0400 Subject: [PATCH 23/24] Update src/checks.rs Co-Authored-By: Annie-Claude Morin --- src/checks.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/checks.rs b/src/checks.rs index d1000e7..b344cdc 100644 --- a/src/checks.rs +++ b/src/checks.rs @@ -47,7 +47,7 @@ You are seeing this warning because the shim directory ({shim_dir}) is not in \ your {path_env_var} environment variable. Normally, alt should configure this automatically during the install process. -In come cases you may need to: +In some cases you may need to: - {reopen_terminal} - {relogin} From 173652bf2ec756450fcff222c18e3a420e4b037c Mon Sep 17 00:00:00 2001 From: Boris Bera Date: Sun, 27 Oct 2019 17:43:45 -0400 Subject: [PATCH 24/24] Add all changes to changelog --- CHANGELOG.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3181325..7c8169a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,8 +11,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `alt scan` now knows about LinuxBrew and can automatically find different version of commands installed through LinuxBrew. +- Add install instructions for Mac OSX using the Homebrew package manager. + (LinuxBrew also supported) +- Add install instructions for `DEB` based linux systems. +- Add install instructions using the pre-built `.tar.gz` release. +- Add install from source instructions. +- Document how to troubleshoot the warning emitted by `alt` when the shim + directory is not present in the `PATH` environment variable. +- Add Homebrew formula update to release instructions. ### Changed - Move the shims directory higher up in the `PATH` on fish by using - `fish_user_paths` + `fish_user_paths`. +- Expand documentation on `alt` in relation to git (and other VCS). +- Update link to rust install instructions. +- Update the shims dir not in `PATH` warning to include troubleshooting steps + and to link to the troubleshooting documentation. + +### Removed + +- The gziped `alt` binary (`alt_{...}.gz`) is no longer packaged. +- Remove support for the `curl ... | bash -s` install method. + +### Fixed + +- Fix crash when `alt` is run without the `PATH` environment variable set.