-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update justfile for use instead of makefile
- Loading branch information
1 parent
57cf5c1
commit d08140d
Showing
2 changed files
with
16 additions
and
20 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 |
---|---|---|
@@ -1,46 +1,42 @@ | ||
set dotenv-load := true | ||
# set dotenv-load := true | ||
|
||
default: | ||
just --list | ||
|
||
# used for tagging our docker images. | ||
TAG := `echo $$APP_RELEASE-$(git log -n 1 --format=%h)` | ||
|
||
# Create Python virtual environment if not yet created. | ||
venv: | ||
test -d .venv || python -m venv .venv | ||
|
||
## Deploy a new release to production. This will not work in Gitpod, as it relies on staff SSH keys for deployment. | ||
release: | ||
dotenv -f env.prod run -- sentry-cli releases new -p admin-portal `sentry-cli releases propose-version` | ||
dotenv -f env.prod run -- sentry-cli releases set-commits --auto `sentry-cli releases propose-version` | ||
dotenv -f env.prod run -- ansible-playbook ansible/deploy.yml -i ansible/inventories/prod.yml | ||
dotenv -f env.prod run -- sentry-cli releases finalize `sentry-cli releases propose-version` | ||
uv run dotenv -f env.prod run -- sentry-cli releases new -p admin-portal `sentry-cli releases propose-version` | ||
uv run dotenv -f env.prod run -- sentry-cli releases set-commits --auto `sentry-cli releases propose-version` | ||
uv run dotenv -f env.prod run -- ansible-playbook ansible/deploy.yml -i ansible/inventories/prod.yml | ||
uv run dotenv -f env.prod run -- sentry-cli releases finalize `sentry-cli releases propose-version` | ||
|
||
# Create a super user for local development using the basic django `createsuperuser` command. | ||
dev_createsuperuser: | ||
dotenv run -- python ./manage.py createsuperuser --username admin --email [email protected] --noinput | ||
dotenv run -- python ./manage.py set_fake_passwords | ||
uv run dotenv run -- python ./manage.py createsuperuser --username admin --email [email protected] --noinput | ||
uv run dotenv run -- python ./manage.py set_fake_passwords | ||
|
||
# Run a django development server that reloads when codes is changed. | ||
dev_runserver: | ||
dotenv run -- python manage.py runserver | ||
uv run dotenv run -- python manage.py runserver | ||
|
||
# Start the tailwind watcher - this will re-run tailwind to generate css as code is changed. | ||
dev_tailwind_start: | ||
dotenv run -- python manage.py tailwind start | ||
uv run dotenv run -- python manage.py tailwind start | ||
|
||
# Install the front end dependencies. | ||
dev_tailwind_install: | ||
dotenv run -- python manage.py tailwind install | ||
uv run dotenv run -- python manage.py tailwind install | ||
|
||
# Run the django tests on a loop with with pytest, and re-running them when code is changed. | ||
dev_test: | ||
uv dotenv run -- pytest -s --create-db --looponfail --ds=greenweb.settings.testing | ||
uv run uv dotenv run -- pytest -s --create-db --looponfail --ds=greenweb.settings.testing | ||
|
||
# Run the django tests on a loop with pytest, but only ones marked with `only`. | ||
dev_test_only: | ||
dotenv run -- pytest -s --create-db --looponfail -m only -v --ds=greenweb.settings.testing | ||
uv run dotenv run -- pytest -s --create-db --looponfail -m only -v --ds=greenweb.settings.testing | ||
|
||
# # Set up the github repo for data analysis against the Green Web Platform database. | ||
data_analysis_repo: | ||
|
@@ -62,15 +58,15 @@ test *options: | |
|
||
# As above, but only the tests marked 'only'. | ||
test_only: | ||
dotenv run -- pytest -s --create-db -m only -v --ds=greenweb.settings.testing | ||
uv run dotenv run -- pytest -s --create-db -m only -v --ds=greenweb.settings.testing | ||
|
||
# Build the documentation using Sphinx. | ||
docs: | ||
dotenv run -- sphinx-build ./docs _build/ | ||
uv run dotenv run -- sphinx-build ./docs _build/ | ||
|
||
# Build the documentation using Sphinx and keep updating it on every change. | ||
docs_watch: | ||
dotenv run -- sphinx-autobuild ./docs _build/ | ||
uv run dotenv run -- sphinx-autobuild ./docs _build/ | ||
|
||
# Make a docker image for publishing to our registry. | ||
docker_build: | ||
|