Skip to content

Commit

Permalink
Small updates to build and docs.
Browse files Browse the repository at this point in the history
alexdlaird committed Oct 25, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 6ef7b9a commit 4732769
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -4,15 +4,15 @@ SHELL := /usr/bin/env bash
PYTHON_BIN ?= python
BRANCH ?= main

all: install clean test
all: test

install:
$(PYTHON_BIN) -m pip install --upgrade heliumcli virtualenv

clean:
rm -rf build

test: clean
test: install clean
mkdir build
cd build && HELIUMCLI_TEMPLATE_PROJECT_VERSION=$(BRANCH) helium-cli init template-project-test-build "Template Project Test Build" test.com heliumedu
$(PYTHON_BIN) -m virtualenv build/template-project-test-build/venv
14 changes: 6 additions & 8 deletions Makefile.template
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
.PHONY: all env virtualenv install nopyc clean build build-migrations migrate test
.PHONY: all env install nopyc clean build build-migrations migrate test

SHELL := /usr/bin/env bash
PYTHON_BIN ?= python
{%PROJECT_ID_UPPER%}_VENV ?= venv

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

env:
cp -n .env.example .env | true

virtualenv:
if [ ! -d "$({%PROJECT_ID_UPPER%}_VENV)" ]; then \
$(PYTHON_BIN) -m pip install virtualenv --user; \
$(PYTHON_BIN) -m virtualenv $({%PROJECT_ID_UPPER%}_VENV); \
fi
venv:
$(PYTHON_BIN) -m pip install virtualenv --user
$(PYTHON_BIN) -m virtualenv $({%PROJECT_ID_UPPER%}_VENV)

install: env virtualenv
install: env venv
( \
source $({%PROJECT_ID_UPPER%}_VENV)/bin/activate; \
python -m pip install -r requirements.txt -r requirements-dev.txt; \

0 comments on commit 4732769

Please sign in to comment.