-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
57 lines (47 loc) · 1.38 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
include golang.mk
include sfncli.mk
.DEFAULT_GOAL := test
SHELL := /bin/bash
PKG := github.com/Clever/s3-to-redshift/v3
PKGS := $(shell go list ./... | grep -v /vendor)
APP_NAME ?= s3-to-redshift
EXECUTABLE = $(APP_NAME)
SFNCLI_VERSION := latest
.PHONY: test $(PKGS) run install_deps build
$(eval $(call golang-version-check,1.16))
# variables for testing
export GEARMAN_ADMIN_PATH ?= x
export GEARMAN_ADMIN_USER ?= x
export GEARMAN_ADMIN_PASS ?= x
export CLEANUP_WORKER ?= x
export REDSHIFT_PASSWORD ?= x
export REDSHIFT_USER ?= x
export REDSHIFT_DB ?= x
export SERVICE_GEARMAN_ADMIN_HTTP_HOST ?= x
export SERVICE_GEARMAN_ADMIN_HTTP_PORT ?= x
export SERVICE_GEARMAN_ADMIN_HTTP_PROTO ?= x
export AWS_REGION ?= x
export REDSHIFT_ROLE_ARN ?= x
export FIREHOSE_EVENTS_ANALYTICS_PIPELINE_JOB_RUNS ?= x
test: $(PKGS)
build: bin/sfncli
$(call golang-build,$(PKG),$(EXECUTABLE))
$(PKGS): golang-test-all-deps
$(call golang-test-all,$@)
# Variables for testing
export S3_BUCKET ?= clever-analytics-dev
export SCHEMA ?= api
export TABLES ?= business_metrics_auth_counts
export DATE ?= 2016-12-03T00:00:00Z
export GRANULARITY ?= day
export FORCE ?= false
export TRUNCATE ?= false
export GZIP ?= true
run: build
bin/sfncli --activityname $(_DEPLOY_ENV)--$(_APP_NAME) \
--region us-west-2 \
--cloudwatchregion us-west-1 \
--workername `hostname` \
--cmd bin/$(EXECUTABLE)
install_deps:
go mod vendor