-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
1,857 additions
and
261 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,13 +25,26 @@ lint: | |
go install github.com/golangci/golangci-lint/cmd/[email protected] | ||
golangci-lint run ./... | ||
|
||
.PHONY: fmt | ||
fmt: | ||
go fmt ./... | ||
|
||
.PHONY: local | ||
local: | ||
export ELASTIC_SEARCH_URL=https://localhost:9200; \ | ||
export AWS_TLS_INSECURE_SKIP_VERIFY=true; \ | ||
export SIGN_ELASTICSEARCH_REQUESTS=true; \ | ||
export AWS_PROFILE=development; \ | ||
export AWS_FILENAME=$(HOME)/.aws/credentials; \ | ||
HUMAN_LOG=1 go run $(LDFLAGS) -race main.go | ||
|
||
.PHONY: build | ||
build: | ||
@mkdir -p $(BUILD_ARCH)/$(BIN_DIR) | ||
go build $(LDFLAGS) -o $(BUILD_ARCH)/$(BIN_DIR)/$(MAIN) main.go | ||
|
||
.PHONY: debug | ||
debug: build | ||
debug: | ||
HUMAN_LOG=1 go run $(LDFLAGS) -race main.go | ||
|
||
.PHONY: test | ||
|
@@ -43,3 +56,12 @@ test-component: | |
go test -cover -race -coverprofile="coverage.txt" -coverpkg=github.com/ONSdigital/$(MAIN)/... -component | ||
|
||
.PHONY: build debug test | ||
|
||
.PHONY: build-reindex | ||
build-reindex: | ||
@mkdir -p $(BUILD) | ||
GOOS=linux GOARCH=amd64 go build -tags=aws -ldflags "-w -s" -o $(BUILD)/reindex cmd/reindex/main.go cmd/reindex/aws.go | ||
|
||
.PHONY: reindex | ||
reindex: | ||
HUMAN_LOG=1 go run -ldflags "-w -s" cmd/reindex/main.go cmd/reindex/local.go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.