From 8bd5d7bb42601862bfadcc769c9bcf6eb47e1d42 Mon Sep 17 00:00:00 2001 From: Nick Thomas <nick@gitlab.com> Date: Wed, 5 Apr 2017 13:28:33 +0100 Subject: [PATCH] Rename es-git-go -> gitlab-elasticsearch-indexer --- Makefile | 8 +++++++- README.md | 3 ++- elastic/client_test.go | 2 +- git/repository_test.go | 2 +- indexer/blob.go | 4 ++-- indexer/blob_test.go | 2 +- indexer/commit.go | 2 +- indexer/commit_test.go | 2 +- indexer/indexer.go | 2 +- indexer/indexer_test.go | 4 ++-- indexer/person.go | 2 +- integration_test.go | 6 +++--- main.go | 6 +++--- 13 files changed, 26 insertions(+), 19 deletions(-) diff --git a/Makefile b/Makefile index d955441..9c8487c 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 6989b41..1e54ca2 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 0b412d1..96f3e35 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 55440d7..881d865 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 4656728..d62e078 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 e9cde92..652daa7 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 c9bef4d..3da72b4 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 6806390..de319e9 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 12a017b..1eb977b 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 1b51b79..e74be5e 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 eb75a83..cc3d628 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 d48fdee..651810a 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 43a299d..c843d21 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() { -- GitLab