mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
install: submit brew patch to upstream
Follow the atempt of pull request #491
This commit is contained in:
parent
4defd6d676
commit
12cd938db3
|
|
@ -1,4 +1,10 @@
|
|||
os:
|
||||
- linux
|
||||
- osx
|
||||
script: ./check_integrity.sh $(find bin | cut -b 5- | xargs)
|
||||
script:
|
||||
- ./check_integrity.sh $(find bin | cut -b 5- | xargs)
|
||||
# Test for the brew release
|
||||
- mkdir ../release && git archive --format=tar.gz HEAD > ../release/git-extras-release.tar.gz
|
||||
- cd ../release
|
||||
- tar -xzf git-extras-release.tar.gz && make PREFIX=$(pwd) INSTALL_VIA=brew
|
||||
- ./bin/git-extras update | grep "brew upgrade git-extras"
|
||||
|
|
|
|||
4
Makefile
4
Makefile
|
|
@ -7,6 +7,7 @@ MANS = $(wildcard man/git-*.md)
|
|||
MAN_HTML = $(MANS:.md=.html)
|
||||
MAN_PAGES = $(MANS:.md=.1)
|
||||
CODE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
||||
INSTALL_VIA ?= source
|
||||
# Libraries used by all commands
|
||||
LIB = "helper/reset-env" "helper/git-extra-utility"
|
||||
|
||||
|
|
@ -17,6 +18,9 @@ default: install
|
|||
docs: $(MAN_HTML) $(MAN_PAGES)
|
||||
|
||||
install:
|
||||
@if [ "$(INSTALL_VIA)" = brew ]; then \
|
||||
git apply brew-release.patch || { echo "Can't apply brew release patch"; exit 1; } \
|
||||
fi
|
||||
@mkdir -p $(DESTDIR)$(MANPREFIX)
|
||||
@mkdir -p $(DESTDIR)$(BINPREFIX)
|
||||
@echo "... installing bins to $(DESTDIR)$(BINPREFIX)"
|
||||
|
|
|
|||
24
brew-release.patch
Normal file
24
brew-release.patch
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
diff --git a/bin/git-extras b/bin/git-extras
|
||||
index e49cd24..4ae28b5 100755
|
||||
--- a/bin/git-extras
|
||||
+++ b/bin/git-extras
|
||||
@@ -4,13 +4,12 @@ VERSION="4.3.0"
|
||||
INSTALL_SCRIPT="https://raw.githubusercontent.com/tj/git-extras/master/install.sh"
|
||||
|
||||
update() {
|
||||
- local bin="$(which git-extras)"
|
||||
- local prefix=${bin%/*/*}
|
||||
- local orig=$PWD
|
||||
-
|
||||
- curl -s $INSTALL_SCRIPT | PREFIX="$prefix" bash /dev/stdin \
|
||||
- && cd "$orig" \
|
||||
- && echo "... updated git-extras $VERSION -> $(git extras --version)"
|
||||
+ echo "This git-extras installation is managed by Homebrew."
|
||||
+ echo "If you'd like to update git-extras, run the following:"
|
||||
+ echo
|
||||
+ echo " brew upgrade git-extras"
|
||||
+ echo
|
||||
+ return 1
|
||||
}
|
||||
|
||||
updateForWindows() {
|
||||
Loading…
Reference in a new issue