diff --git a/Makefile b/Makefile deleted file mode 100644 index e6ee537af..000000000 --- a/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -SHELL := /bin/bash -euxo pipefail -.PHONY: update-secrets -update-secrets: - # After updating secrets, commit the new secrets.tar.gpg file. - tar cvf secrets.tar ci_secrets/ - gpg --yes --batch --passphrase=${PASSPHRASE_FOR_VUFORIA_SECRETS} --symmetric --cipher-algo AES256 secrets.tar - -.PHONY: docs -docs: - uv run --extra=dev sphinx-build -M html docs/source docs/build -W - -.PHONY: open-docs -open-docs: - python -c 'import os, webbrowser; webbrowser.open("file://" + os.path.abspath("docs/build/html/index.html"))' diff --git a/admin/create_secrets_files.py b/admin/create_secrets_files.py index 702091c87..4a6dd7449 100644 --- a/admin/create_secrets_files.py +++ b/admin/create_secrets_files.py @@ -1,15 +1,6 @@ """Create licenses and target databases for the tests to run against. -Usage: - - $ export VWS_EMAIL_ADDRESS=... - $ export VWS_PASSWORD=... - # For ``make update-secrets`` to work, this has to be ``./ci_secrets``, or - # you have to copy the secrets there later. - $ export NEW_SECRETS_DIR=... - $ export EXISTING_SECRETS_FILE=/existing/file/with/inactive/db/creds - # You may have to run this a few times, but it is idempotent. - $ python admin/create_secrets_files.py +See the instructions in the contributing guide in the documentation. """ import datetime diff --git a/docs/source/ci-setup.rst b/docs/source/ci-setup.rst index 0c46b4d0b..dbe735882 100644 --- a/docs/source/ci-setup.rst +++ b/docs/source/ci-setup.rst @@ -35,7 +35,8 @@ Add the encrypted secrets files to the repository: .. code-block:: console - $ PASSPHRASE_FOR_VUFORIA_SECRETS="" make update-secrets + $ tar cvf secrets.tar ci_secrets/ + $ gpg --yes --batch --passphrase="${PASSPHRASE_FOR_VUFORIA_SECRETS}" --symmetric --cipher-algo AES256 secrets.tar $ git add secrets.tar.gpg $ git commit -m "Update secret archive" $ git push diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index daa07ba76..6d7d40a7a 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -91,8 +91,25 @@ To create an inactive project, delete the license key associated with a database Targets sometimes get stuck at the "Processing" stage meaning that they cannot be deleted. When this happens, create a new target database to use for testing. -To create databases without using the browser, use :file:`admin/create_secrets_files.py`. -See instructions in that file. +To create databases without using the browser, use :file:`admin/create_secrets_files.py`: + +.. code-block:: bash + + $ export VWS_EMAIL_ADDRESS=... + $ export VWS_PASSWORD=... + $ export NEW_SECRETS_DIR=... + $ export EXISTING_SECRETS_FILE=/existing/file/with/inactive/db/creds + # You may have to run this a few times, but it is idempotent. + $ python admin/create_secrets_files.py + # After creating the secrets, update the encrypted archive: + $ tar cvf secrets.tar "${NEW_SECRETS_DIR}" + $ gpg \ + --yes \ + --batch \ + --passphrase="${PASSPHRASE_FOR_VUFORIA_SECRETS}" \ + --symmetric \ + --cipher-algo AES256 \ + secrets.tar .. _Vuforia License Manager: https://developer.vuforia.com/vui/develop/licenses .. _Vuforia Target Manager: https://developer.vuforia.com/vui/develop/databases @@ -120,8 +137,8 @@ Run the following commands to build and view documentation locally: .. code-block:: console - $ make docs - $ make open-docs + $ uv run --extra=dev sphinx-build -M html docs/source docs/build -W + $ python -c 'import os, webbrowser; webbrowser.open("file://" + os.path.abspath("docs/build/html/index.html"))' Continuous Integration ----------------------