Skip to content

Commit

Permalink
Clean up Redis after doctesting README.md (#292)
Browse files Browse the repository at this point in the history
I got this ridiculous Makefile hack from here:
https://stackoverflow.com/a/25690899
  • Loading branch information
brainix authored Dec 9, 2020
1 parent a79be8d commit bfce543
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ init upgrade: formulae := {openssl,readline,xz,redis}
python upgrade: version ?= 3.9.0
upgrade: requirements ?= requirements-to-freeze.txt

clean-redis: keys_to_delete = \
clean-redis clean-redis-2: keys_to_delete = \
basket \
dilberts \
expensive-function-cache \
Expand Down Expand Up @@ -92,10 +92,10 @@ else
endif

.PHONY: test-readme
test-readme: clean-redis run-doctest clean-redis
test-readme: clean-redis run-doctest clean-redis-2

.PHONY: clean-redis
clean-redis:
.PHONY: clean-redis clean-redis-2
clean-redis clean-redis-2:
@source $(venv)/bin/activate && \
python3 -c "from redis import Redis; redis = Redis(); redis.delete($(foreach key,$(keys_to_delete),'$(key)',))"

Expand Down

0 comments on commit bfce543

Please sign in to comment.