File tree Expand file tree Collapse file tree 3 files changed +35
-1
lines changed
Expand file tree Collapse file tree 3 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 11os :
22 - linux
33 - osx
4- script : ./check_integrity.sh $(find bin | cut -b 5- | xargs)
4+ script :
5+ - ./check_integrity.sh $(find bin | cut -b 5- | xargs)
6+ # Test for the brew release
7+ - mkdir ../release && git archive --format=tar.gz HEAD > ../release/git-extras-release.tar.gz
8+ - cd ../release
9+ - tar -xzf git-extras-release.tar.gz && make PREFIX=$(pwd) INSTALL_VIA=brew
10+ - ./bin/git-extras update | grep "brew upgrade git-extras"
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ MANS = $(wildcard man/git-*.md)
77MAN_HTML = $(MANS:.md=.html )
88MAN_PAGES = $(MANS:.md=.1 )
99CODE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST ) ) ) )
10+ INSTALL_VIA ?= source
1011# Libraries used by all commands
1112LIB = "helper/reset-env" "helper/git-extra-utility"
1213
@@ -17,6 +18,9 @@ default: install
1718docs : $(MAN_HTML ) $(MAN_PAGES )
1819
1920install :
21+ @if [ " $( INSTALL_VIA) " = brew ]; then \
22+ git apply brew-release.patch || { echo " Can't apply brew release patch" ; exit 1; } \
23+ fi
2024 @mkdir -p $(DESTDIR )$(MANPREFIX )
2125 @mkdir -p $(DESTDIR )$(BINPREFIX )
2226 @echo " ... installing bins to $( DESTDIR) $( BINPREFIX) "
Original file line number Diff line number Diff line change 1+ diff --git a/bin/git-extras b/bin/git-extras
2+ index e49cd24..4ae28b5 100755
3+ --- a/bin/git-extras
4+ +++ b/bin/git-extras
5+ @@ -4,13 +4,12 @@ VERSION="4.3.0"
6+ INSTALL_SCRIPT="https://raw.githubusercontent.com/tj/git-extras/master/install.sh"
7+
8+ update() {
9+ - local bin="$(which git-extras)"
10+ - local prefix=${bin%/*/*}
11+ - local orig=$PWD
12+ -
13+ - curl -s $INSTALL_SCRIPT | PREFIX="$prefix" bash /dev/stdin \
14+ - && cd "$orig" \
15+ - && echo "... updated git-extras $VERSION -> $(git extras --version)"
16+ + echo "This git-extras installation is managed by Homebrew."
17+ + echo "If you'd like to update git-extras, run the following:"
18+ + echo
19+ + echo " brew upgrade git-extras"
20+ + echo
21+ + return 1
22+ }
23+
24+ updateForWindows() {
You can’t perform that action at this time.
0 commit comments