Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate git update-microsoft-git with apt-get #434

Merged
merged 2 commits into from Sep 29, 2021

Conversation

derrickstolee
Copy link
Collaborator

Extend the git update-microsoft-git builtin to call apt-get in a similar way we do brew on macOS.

The 'git update-microsoft-git' builtin already interfaces with the
git-for-windows/git upgrader on Windows and brew on macOS. Add an
integration with apt-get on Ubuntu. The implementation attempts to call
apt-get on all Linux machines, but it will report a failure when that is
not available. The two commands are:

1. sudo apt-get update
2. sudo apt-get upgrade microsoft-git

The first has an error message because that will likely only fail when
apt-get does not exist on the path (or the user fails to supply the sudo
password). The error condition for the second is passed to the user. It
is possible that a user installs a package manually and not through a
Microsoft feed, in which case the 'upgrade' command will fail with an
error message.

Extra newlines are added to provide whitespace between the Git messages
and the dense output from apt-get.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Update the Ubuntu/Linux install instructions to reference 'git
update-microsoft-git'.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Copy link
Collaborator

@ldennington ldennington left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran with the following scenarios locally on my 20.04 VM, and all behaved as expected:

  1. microsoft-git is not installed -> latest version of microsoft-git is installed
  2. microsoft-git is installed but out-of-date -> microsoft-git is upgraded to latest version
  3. microsoft-git is installed and up-to-date -> no-op

So I say 🚢 it!

@derrickstolee derrickstolee merged commit f120a72 into microsoft:vfs-2.33.0 Sep 29, 2021
dscho pushed a commit that referenced this pull request Oct 30, 2021
…pt-get`

Extend the `git update-microsoft-git` builtin to call `apt-get` in a similar way we do `brew` on macOS.
derrickstolee added a commit that referenced this pull request Oct 30, 2021
…pt-get`

Extend the `git update-microsoft-git` builtin to call `apt-get` in a similar way we do `brew` on macOS.
derrickstolee added a commit that referenced this pull request Oct 31, 2021
…pt-get`

Extend the `git update-microsoft-git` builtin to call `apt-get` in a similar way we do `brew` on macOS.
derrickstolee added a commit that referenced this pull request Nov 4, 2021
…pt-get`

Extend the `git update-microsoft-git` builtin to call `apt-get` in a similar way we do `brew` on macOS.
derrickstolee added a commit that referenced this pull request Nov 4, 2021
…pt-get`

Extend the `git update-microsoft-git` builtin to call `apt-get` in a similar way we do `brew` on macOS.
derrickstolee added a commit that referenced this pull request Nov 10, 2021
…pt-get`

Extend the `git update-microsoft-git` builtin to call `apt-get` in a similar way we do `brew` on macOS.
derrickstolee added a commit that referenced this pull request Nov 15, 2021
…pt-get`

Extend the `git update-microsoft-git` builtin to call `apt-get` in a similar way we do `brew` on macOS.
ldennington pushed a commit to ldennington/git that referenced this pull request Jan 12, 2022
…` with `apt-get`

Extend the `git update-microsoft-git` builtin to call `apt-get` in a similar way we do `brew` on macOS.
ldennington pushed a commit to ldennington/git that referenced this pull request Jan 19, 2022
…` with `apt-get`

Extend the `git update-microsoft-git` builtin to call `apt-get` in a similar way we do `brew` on macOS.
ldennington pushed a commit to ldennington/git that referenced this pull request Jan 20, 2022
…` with `apt-get`

Extend the `git update-microsoft-git` builtin to call `apt-get` in a similar way we do `brew` on macOS.
ldennington pushed a commit to ldennington/git that referenced this pull request Jan 20, 2022
…` with `apt-get`

Extend the `git update-microsoft-git` builtin to call `apt-get` in a similar way we do `brew` on macOS.
ldennington pushed a commit to ldennington/git that referenced this pull request Jan 20, 2022
…` with `apt-get`

Extend the `git update-microsoft-git` builtin to call `apt-get` in a similar way we do `brew` on macOS.
ldennington pushed a commit to ldennington/git that referenced this pull request Jan 20, 2022
…` with `apt-get`

Extend the `git update-microsoft-git` builtin to call `apt-get` in a similar way we do `brew` on macOS.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants