summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEdgar Lee <edgar.lee@docker.com>2017-06-01 16:27:17 -0700
committerEdgar Lee <edgar.lee@docker.com>2017-06-01 17:08:47 -0700
commit7d3575b3624c39f26c5f7a1646ebe2f78920f04a (patch)
tree3375113ca5f14919e333d2d0a9d1915d52e59069 /src
parent5d6eb5bfd64c6d5d773c71159d819b651dd5f7f1 (diff)
Use glide to handle go dependencies
Diffstat (limited to 'src')
-rw-r--r--src/Makefile12
-rwxr-xr-xsrc/deps18
-rw-r--r--src/options.go2
-rw-r--r--src/tui/tcell.go7
-rw-r--r--src/util/util.go4
-rw-r--r--src/util/util_windows.go2
6 files changed, 9 insertions, 36 deletions
diff --git a/src/Makefile b/src/Makefile
index b8c3090c..5205b1c1 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -12,8 +12,6 @@ endif
SOURCES := $(wildcard *.go */*.go)
ROOTDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
BINDIR := $(shell dirname $(ROOTDIR))/bin
-GOPATH := $(shell dirname $(ROOTDIR))/gopath
-SRCDIR := $(GOPATH)/src/github.com/junegunn/fzf/src
BINARY32 := fzf-$(GOOS)_386
BINARY64 := fzf-$(GOOS)_amd64
BINARYARM5 := fzf-$(GOOS)_arm5
@@ -27,7 +25,6 @@ RELEASEARM5 := fzf-$(VERSION)-$(GOOS)_arm5
RELEASEARM6 := fzf-$(VERSION)-$(GOOS)_arm6
RELEASEARM7 := fzf-$(VERSION)-$(GOOS)_arm7
RELEASEARM8 := fzf-$(VERSION)-$(GOOS)_arm8
-export GOPATH
# https://en.wikipedia.org/wiki/Uname
UNAME_M := $(shell uname -m)
@@ -79,13 +76,8 @@ release-all: clean test
GOOS=openbsd make release
GOOS=windows make release
-$(SRCDIR):
- mkdir -p $(shell dirname $(SRCDIR))
- ln -s $(ROOTDIR) $(SRCDIR)
-
-deps: $(SRCDIR) $(SOURCES)
- cd $(SRCDIR) && go get -tags "$(TAGS)"
- ./deps
+deps: $(SOURCES)
+ cd .. && go get -u github.com/Masterminds/glide && $(GOPATH)/bin/glide install
test: deps
SHELL=/bin/sh GOOS= go test -v -tags "$(TAGS)" ./...
diff --git a/src/deps b/src/deps
deleted file mode 100755
index cdb39149..00000000
--- a/src/deps
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env bash
-
-if [ -z "$GOPATH" ]; then
- echo '$GOPATH not defined'
- exit 1
-fi
-
-reset() (
- cd "$GOPATH/src/$1"
- export GIT_DIR="$(pwd)/.git"
- [ "$(git rev-parse HEAD)" = "$2" ] ||
- (git fetch && git reset --hard "$2")
-)
-
-reset github.com/junegunn/go-isatty 66b8e73f3f5cda9f96b69efd03dd3d7fc4a5cdb8
-reset github.com/junegunn/go-runewidth 14207d285c6c197daabb5c9793d63e7af9ab2d50
-reset github.com/junegunn/go-shellwords 02e3cf038dcea8290e44424da473dd12be796a8a
-reset golang.org/x/crypto abc5fa7ad02123a41f02bf1391c9760f7586e608
diff --git a/src/options.go b/src/options.go
index e9e2f28e..a0b28d43 100644
--- a/src/options.go
+++ b/src/options.go
@@ -12,7 +12,7 @@ import (
"github.com/junegunn/fzf/src/tui"
"github.com/junegunn/fzf/src/util"
- "github.com/junegunn/go-shellwords"
+ "github.com/mattn/go-shellwords"
)
const usage = `usage: fzf [options]
diff --git a/src/tui/tcell.go b/src/tui/tcell.go
index 3a8c7655..e66ed2f0 100644
--- a/src/tui/tcell.go
+++ b/src/tui/tcell.go
@@ -8,11 +8,10 @@ import (
"runtime"
- // https://github.com/gdamore/tcell/pull/135
- "github.com/junegunn/tcell"
- "github.com/junegunn/tcell/encoding"
+ "github.com/gdamore/tcell"
+ "github.com/gdamore/tcell/encoding"
- "github.com/junegunn/go-runewidth"
+ "github.com/mattn/go-runewidth"
)
func HasFullscreenRenderer() bool {
diff --git a/src/util/util.go b/src/util/util.go
index 15ec0ad8..867935ac 100644
--- a/src/util/util.go
+++ b/src/util/util.go
@@ -5,8 +5,8 @@ import (
"os"
"time"
- "github.com/junegunn/go-isatty"
- "github.com/junegunn/go-runewidth"
+ "github.com/mattn/go-isatty"
+ "github.com/mattn/go-runewidth"
)
var _runeWidths = make(map[rune]int)
diff --git a/src/util/util_windows.go b/src/util/util_windows.go
index 06644167..1bf8f7aa 100644
--- a/src/util/util_windows.go
+++ b/src/util/util_windows.go
@@ -7,7 +7,7 @@ import (
"os/exec"
"syscall"
- "github.com/junegunn/go-shellwords"
+ "github.com/mattn/go-shellwords"
)
// ExecCommand executes the given command with $SHELL