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

Install latest release version instead of latest code in manual way #371

Closed
spacewander opened this issue May 13, 2015 · 1 comment
Closed

Comments

@spacewander
Copy link
Collaborator

The installation guide's one-liner way use command below to install git-extras:

(cd /tmp && git clone --depth 1 https://github.com/tj/git-extras.git && cd git-extras && sudo make install)

However, it will install the latest code, instead of the latest release version, which may contain some bugs.

There are three ways to install the latest release version (all has problem with it):

  1. checkout the latest tag

    (cd /tmp && git clone https://github.com/tj/git-extras.git && cd git-extras && git checkout $(git describe --tags $(git rev-list --tags --max-count=1)) && sudo make install)
    

    Problem: This way need to fully clone the repo, with all its history message. It will increase the size of data (from 125k to 746k) and slow down installation.

  2. clone release branch

    (cd /tmp && git clone -b release --depth 1 https://github.com/tj/git-extras.git && cd git-extras && sudo make install)
    

    Problem: This way requires us to maintain a release branch.

  3. clone latest tag

    (cd /tmp && git clone -b $(git ls-remote --tags https://github.com/tj/git-extras.git | grep -o '[0-9]\+\.[0-9]\+\.[0-9]\+' | sort -V | tail -1) --depth 1 https://github.com/tj/git-extras.git && cd git-extras && sudo make install)
    

    Problem: 1. too complex 2. force tags to match [0-9]+\.[0-9]+\.[0-9]+.

@hemanth
Any other suggestions?

@hemanth
Copy link
Collaborator

hemanth commented May 13, 2015

I would vote for checking out the latest tag.

@hemanth hemanth closed this as completed May 13, 2015
tardypad pushed a commit to tardypad/git-extras that referenced this issue Jul 13, 2016
winters2214 added a commit to winters2214/Extras that referenced this issue Jan 8, 2018
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

No branches or pull requests

2 participants