Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexdlaird committed Oct 25, 2024
2 parents 9f8fb71 + ffbe4a1 commit f9e56fc
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[run]
branch = True
omit =
.venv/**
venv/**
conf/**
*/admin.py
*/apps.py
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ db.sqlite3-journal
.coverage
*.log
.env
.venv
venv
build
docs/_build
docs/_static
Expand Down
19 changes: 9 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
.PHONY: all env docker-env virtualenv install install-dev nopyc clean build build-migrations migrate test build-docker run-docker stop-docker publish-docker

SHELL := /usr/bin/env bash
PLATFORM_VENV ?= .venv
PYTHON_BIN := python
PLATFORM_VENV ?= venv
AWS_REGION ?= us-east-1
TAG_VERSION ?= latest
PLATFORM ?= linux/arm64

all: env virtualenv install build migrate test build-docker
all: build migrate test build-docker

env:
cp -n .env.example .env | true
Expand All @@ -18,19 +19,17 @@ docker-env:
sudo sh -c "grep -qxF '127.0.0.1 storage' /etc/hosts || echo '127.0.0.1 storage' >> /etc/hosts"; \
fi

virtualenv:
@if [ ! -d "$(PLATFORM_VENV)" ]; then \
python3 -m pip install virtualenv; \
python3 -m virtualenv $(PLATFORM_VENV); \
fi
venv:
$(PYTHON_BIN) -m pip install virtualenv
$(PYTHON_BIN) -m virtualenv $(PLATFORM_VENV)

install: env virtualenv
install: env venv
@( \
source $(PLATFORM_VENV)/bin/activate; \
python -m pip install -r requirements.txt -r requirements-deploy.txt; \
)

install-dev: env virtualenv
install-dev: env venv
@( \
source $(PLATFORM_VENV)/bin/activate; \
python -m pip install -r requirements.txt -r requirements-dev.txt; \
Expand Down Expand Up @@ -80,7 +79,7 @@ run-docker: docker-env
stop-docker:
docker compose stop

publish-docker:
publish-docker: build-docker
aws ecr get-login-password --region $(AWS_REGION) | docker login --username AWS --password-stdin $(AWS_ACCOUNT_ID).dkr.ecr.us-east-1.amazonaws.com

docker tag helium/platform-resource:$(TAG_VERSION) $(AWS_ACCOUNT_ID).dkr.ecr.us-east-1.amazonaws.com/helium/platform-resource:$(TAG_VERSION)
Expand Down

0 comments on commit f9e56fc

Please sign in to comment.