Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
.PHONY: install deps wheel container dist clean test tests update
.PHONY: help install deps wheel container dist clean distclean test tests \
update publish
SHELL=/bin/bash
S3_BUCKET=carbon-deploy
LIBAIO_SO=libaio.so.1.0.1
ORACLE_ZIP=instantclient-basiclite-linux.x64-18.3.0.0.0dbru.zip
ECR_REGISTRY=672626379771.dkr.ecr.us-east-1.amazonaws.com

install:
help: ## Print this message
@awk 'BEGIN { FS = ":.*##"; print "Usage: make <target>\n\nTargets:" } \
/^[-_[:alpha:]]+:.?*##/ { printf " %-15s%s\n", $$1, $$2 }' $(MAKEFILE_LIST)

install: ## Install python dependencies (runs `pipenv install`)
pipenv install

vendor/$(ORACLE_ZIP):
Expand All @@ -21,31 +25,31 @@ container:
-t $(ECR_REGISTRY)/carbon:`git describe --always` \
-t carbon:latest .

dist: deps wheel container
dist: deps wheel container ## Build docker image
@tput setaf 2
@tput bold
@echo "Finished building docker image. Try running:"
@echo " $$ docker run --rm carbon:latest"
@tput sgr0

clean:
clean: ## Remove build artifacts
find . -name "*.pyc" -print0 | xargs -0 rm -f
find . -name '__pycache__' -print0 | xargs -0 rm -rf
rm -rf .coverage .tox *.egg-info .eggs build/ dist/

distclean: clean
distclean: clean ## Remove build artifacts and vendor libs
rm -rf vendor/

test:
test: ## Run tests
tox

tests: test

update:
update: ## Update all python dependencies
pipenv clean
pipenv update --dev

publish:
publish: ## Push and tag the latest image (use `make dist && make publish`)
$$(aws ecr get-login --no-include-email --region us-east-1)
docker push $(ECR_REGISTRY)/carbon:latest
docker push $(ECR_REGISTRY)/carbon:`git describe --always`