mcaptcha-api-rs/Makefile
Aravinth Manivannan 0f9caf7777
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
fix: use dotenv to load test data
2024-01-02 20:10:06 +05:30

21 lines
815 B
Makefile

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 "SECRET=$(SECRET)" > .env.local
echo "SITEKEY=$(SITEKEY)" >> .env.local
echo "TOKEN=$(TOKEN)" >> .env.local
test:
cargo test
lint:
black src/ scripts/