Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GokhanPolat/794ed4824dba28bde678b52dbc19c639 to your computer and use it in GitHub Desktop.
Save GokhanPolat/794ed4824dba28bde678b52dbc19c639 to your computer and use it in GitHub Desktop.
Homebrew Install Specific Version of Formula
cd $(brew --repo homebrew/core)
git log master -- Formula/mpv.rb
commit 214fbf099806e2c79ec0f214e12b5becca988011
Author: BrewTestBot <homebrew-test-bot@lists.sfconservancy.org>
Date:   Mon Jan 27 00:06:05 2020 +0000

    mpv: update 0.32.0 bottle.

commit cd6bde651d65ebe4b6d6e286dce443a4be648e26
Author: jnozsc <jnozsc@gmail.com>
Date:   Sun Jan 26 13:40:56 2020 -0800

    mpv 0.32.0

    Closes #49414.

    Signed-off-by: Rui Chen <chenrui333@gmail.com>

commit 29f8527b0fb932d4a33f1332e09461700f504f2d
Author: BrewTestBot <homebrew-test-bot@lists.sfconservancy.org>
Date:   Mon Dec 30 11:51:52 2019 +0000

    mpv: update 0.31.0 bottle.

commit fb5f01885d8cefc6102752aff3009eaa62627a86
Author: jnozsc <jnozsc@gmail.com>
Date:   Sun Dec 29 17:45:11 2019 -0800

    mpv 0.31.0

    Closes #48380.

    Signed-off-by: Alexander Bayandin <a.bayandin@gmail.com>

commit 8f56b0f0ab4e7bca731f8bf9c9e0ebca77ec7fdf
Author: BrewTestBot <homebrew-test-bot@lists.sfconservancy.org>
Date:   Sat Dec 7 12:54:39 2019 +0000

    mpv: update 0.30.0 bottle.

commit 32dc0b811a03162374eae914cb78d226bdb6111a
Author: Issy Long <me@issyl0.co.uk>
Date:   Fri Dec 6 20:16:18 2019 +0000

    mpv: Ensure that installing uses Python 3

    - Over in Homebrew/linuxbrew-core, we thought we could remove
      `uses_from_macos "python@2"` given this looked to have macOS Python 3
      dependencies.
    - Turns out, `bootstrap.py`'s shebang line had `/usr/bin/env python`,
...
...

Then install with url using this commit hash. This command installs mpv version 0.31.0. Before that, check this is a correct version. https://raw.githubusercontent.com/Homebrew/homebrew-core/29f8527b0fb932d4a33f1332e09461700f504f2d/Formula/mpv.rb

brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/29f8527b0fb932d4a33f1332e09461700f504f2d/Formula/mpv.rb

After that, we need to unlink new version. Unlink already installed mpv 0.32.0

brew unlink mpv

Switch old version Make sure which versions installed for mpv

ls -al /usr/local/Cellar/mpv/

Than switch correct version

brew switch mpv 0.31.0

Maybe we need to link this app again

brew link mpv
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment