diff --git a/Makefile b/Makefile index d95544105a8f2969e2b935aecaee9645b3ab4b88..9c8487c4374499cf7f88b2c7a1b7244b3d73f443 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,12 @@ # The import path is where your repository can be found. # To import subpackages, always prepend the full import path. # If you change this, run `make clean`. Read more: https://git.io/vM7zV -IMPORT_PATH := gitlab.com/gitlab-org/es-git-go +IMPORT_PATH := gitlab.com/gitlab-org/gitlab-elasticsearch-indexer GO15VENDOREXPERIMENT := 1 +PREFIX ?= /usr/local + # V := 1 # When V is set, print commands and build progress. # Space separated patterns of packages to skip in list, test, format. @@ -17,6 +19,10 @@ all: build build: .GOPATH/.ok $Q go install $(if $V,-v) $(VERSION_FLAGS) $(IMPORT_PATH) +install: build + install -d ${PREFIX}/bin + install -m755 bin/gitlab-elasticsearch-indexer ${PREFIX}/bin + ### Code not in the repository root? Another binary? Add to the path like this. # .PHONY: otherbin # otherbin: .GOPATH/.ok diff --git a/README.md b/README.md index 6989b41ac50b47976131d34d1980677ef8cdba62..1e54ca2e7bd0e1c49071ea654503adedc0ac1044 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,8 @@ # GitLab Elasticsearch Indexer This project indexes Git repositories into Elasticsearch for GitLab. See the -[homepage](https://gitlab.com/gitlab-org/es-git-go) for more information. +[homepage](https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer) for more +information. ## Building diff --git a/elastic/client_test.go b/elastic/client_test.go index 0b412d131930c25bca8b6929ea621adc84d72969..96f3e3543726414cfdcd00e6bf54b28fdc5c6a0e 100644 --- a/elastic/client_test.go +++ b/elastic/client_test.go @@ -13,7 +13,7 @@ import ( "github.com/stretchr/testify/assert" - "gitlab.com/gitlab-org/es-git-go/elastic" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/elastic" ) const ( diff --git a/git/repository_test.go b/git/repository_test.go index 55440d7fcb69e610479c6fceaeb439670b35962c..881d8656dc3e3887e9b0faa57573dee5ca5ac265 100644 --- a/git/repository_test.go +++ b/git/repository_test.go @@ -10,7 +10,7 @@ import ( "github.com/stretchr/testify/assert" - "gitlab.com/gitlab-org/es-git-go/git" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/git" ) var ( diff --git a/indexer/blob.go b/indexer/blob.go index 4656728ebbcbc9b1c8a86d3c71c1f616c99aaafc..d62e07811ce502dbe65a7c59616b5e8f92ca5141 100644 --- a/indexer/blob.go +++ b/indexer/blob.go @@ -5,8 +5,8 @@ import ( "fmt" "io/ioutil" - "gitlab.com/gitlab-org/es-git-go/git" - "gitlab.com/gitlab-org/es-git-go/linguist" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/git" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/linguist" ) var ( diff --git a/indexer/blob_test.go b/indexer/blob_test.go index e9cde92fa8f6ce92ffd3687dd8057b3c4bf8b1f9..652daa76fb0bf76ffce8a04595c968d0e907eee6 100644 --- a/indexer/blob_test.go +++ b/indexer/blob_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - "gitlab.com/gitlab-org/es-git-go/indexer" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/indexer" ) func TestBuildBlob(t *testing.T) { diff --git a/indexer/commit.go b/indexer/commit.go index c9bef4d6fcfbaddd89a4c8d7ba63ea96105b6daf..3da72b407212ac3e3cf777fb70cc345096a70183 100644 --- a/indexer/commit.go +++ b/indexer/commit.go @@ -3,7 +3,7 @@ package indexer import ( "fmt" - "gitlab.com/gitlab-org/es-git-go/git" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/git" ) type Commit struct { diff --git a/indexer/commit_test.go b/indexer/commit_test.go index 6806390fba4f7652fdaddb33f94c3d309444bb83..de319e9602465179a5fc7f5d683cf1c5564b4c18 100644 --- a/indexer/commit_test.go +++ b/indexer/commit_test.go @@ -6,7 +6,7 @@ import ( "github.com/stretchr/testify/assert" - "gitlab.com/gitlab-org/es-git-go/indexer" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/indexer" ) func TestBuildCommit(t *testing.T) { diff --git a/indexer/indexer.go b/indexer/indexer.go index 12a017b8ececf7d0dc4c8444ac4fcb72f8818ae2..1eb977bfe3f24498eed8bd7ad859d4ef594d17a7 100644 --- a/indexer/indexer.go +++ b/indexer/indexer.go @@ -4,7 +4,7 @@ import ( "fmt" "log" - "gitlab.com/gitlab-org/es-git-go/git" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/git" ) type Submitter interface { diff --git a/indexer/indexer_test.go b/indexer/indexer_test.go index 1b51b7912945e34fb7bb5e6a855efd67a47928e2..e74be5ec6d3f4ccb6cd39d64890038c6d381540d 100644 --- a/indexer/indexer_test.go +++ b/indexer/indexer_test.go @@ -10,8 +10,8 @@ import ( "github.com/stretchr/testify/assert" - "gitlab.com/gitlab-org/es-git-go/git" - "gitlab.com/gitlab-org/es-git-go/indexer" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/git" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/indexer" ) const ( diff --git a/indexer/person.go b/indexer/person.go index eb75a836fd19ff4142f382fb14c5a794b84c1151..cc3d6281703e53929e1e457d0765b02a542180a0 100644 --- a/indexer/person.go +++ b/indexer/person.go @@ -3,7 +3,7 @@ package indexer import ( "time" - "gitlab.com/gitlab-org/es-git-go/git" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/git" ) const ( diff --git a/integration_test.go b/integration_test.go index d48fdee1fccbfcf316e9b4bbcc1dd66572834913..651810a4699f97780738ad58318ed414b38941e3 100644 --- a/integration_test.go +++ b/integration_test.go @@ -11,12 +11,12 @@ import ( "github.com/stretchr/testify/assert" - "gitlab.com/gitlab-org/es-git-go/elastic" - "gitlab.com/gitlab-org/es-git-go/indexer" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/elastic" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/indexer" ) var ( - binary = flag.String("binary", "./bin/es-git-go", "Path to `es-git-go` binary for integration tests") + binary = flag.String("binary", "./bin/gitlab-elasticsearch-indexer", "Path to `gitlab-elasticsearch-indexer` binary for integration tests") testRepo = flag.String("test-repo", "./tmp/gitlab-test.git", "Path to `gitlab-test` repository for integration tests") ) diff --git a/main.go b/main.go index 43a299dbe2cecc617c937aa5f81270ff8fead8ec..c843d2113fc01baeb6291e920ef894543807ebfd 100644 --- a/main.go +++ b/main.go @@ -4,9 +4,9 @@ import ( "log" "os" - "gitlab.com/gitlab-org/es-git-go/elastic" - "gitlab.com/gitlab-org/es-git-go/git" - "gitlab.com/gitlab-org/es-git-go/indexer" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/elastic" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/git" + "gitlab.com/gitlab-org/gitlab-elasticsearch-indexer/indexer" ) func main() {