2024-01-02 19:16:37 +05:30
|
|
|
env:
|
|
|
|
./scripts/download-cli.sh download
|
|
|
|
. venv/bin/activate && pip install -r requirements.txt
|
|
|
|
. venv/bin/activate && pip install build
|
|
|
|
|
|
|
|
test.env:
|
|
|
|
$(eval SECRET = $(shell . ./venv/bin/activate && python ./scripts/create_captcha.py get_secret $(INSTANCE_URL) $(USERNAME) $(PASSWORD)))
|
|
|
|
$(eval SITEKEY = $(shell . ./venv/bin/activate && python ./scripts/create_captcha.py create_captcha $(INSTANCE_URL) $(USERNAME) $(PASSWORD)))
|
|
|
|
$(eval WIDGET_URL = $(shell . ./venv/bin/activate && python ./scripts/create_captcha.py widget_url $(INSTANCE_URL) $(SITEKEY)))
|
|
|
|
$(eval TOKEN = $(shell ./scripts/download-cli.sh gen_pow $(WIDGET_URL)))
|
|
|
|
@-rm .env.local
|
|
|
|
echo "export SECRET=$(SECRET)" > .env.local
|
|
|
|
echo "export SITEKEY=$(SITEKEY)" >> .env.local
|
|
|
|
echo "export WIDGET_URL=$(WIDGET_URL)" >> .env.local
|
|
|
|
echo "export TOKEN=$(TOKEN)" >> .env.local
|
|
|
|
|
|
|
|
|
|
|
|
test:
|
2024-01-02 19:43:03 +05:30
|
|
|
SITEKEY=$(SITEKEY) SECRET=$(SECRET) \
|
2024-01-02 19:16:37 +05:30
|
|
|
INSTANCE_URL=$(INSTANCE_URL) \
|
2024-01-02 19:43:03 +05:30
|
|
|
TOKEN=$(TOKEN) cargo test
|
2024-01-02 19:16:37 +05:30
|
|
|
|
|
|
|
lint:
|
|
|
|
black src/ scripts/
|