Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Fix: make-content-* rules kinda work again. Related: #963.
Browse files Browse the repository at this point in the history
  • Loading branch information
fisx committed Aug 11, 2016
1 parent ba98eb3 commit 2a9d35c
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ EXEC=`test -d .stack-work/ && echo "stack exec --" || echo "cabal exec --"`
HLINT=$(EXEC) hlint
AULA_SOURCES=-isrc -itests -iexec -idist/build/autogen
AULA_IMAGE=quay.io/liqd/aula:aula-docker-0.2
AULA_URL=http://localhost:$(shell grep _listenerPort < aula.yaml | cut -d' ' -f2)

.phony:

Expand Down Expand Up @@ -67,18 +66,21 @@ ghci-no-type-errors:
wc:
find src tests -name '*.hs' | xargs wc

content:
content-login: .phony
rm -f cookie-jar
curl -XPOST $(AULA_URL)/api/manage-state/create-init
curl -c cookie-jar -F /login.user=admin -F /login.pass=pssst $(AULA_URL)/login
curl -b cookie-jar -XPOST $(AULA_URL)/api/manage-state/create-demo
curl -b cookie-jar -XPOST $(AULA_URL)/api/manage-state/create-votes
[ "$(AULA_MK_CONTENT_URL)" != "" ] || ( echo "set to e.g. 'http://localhost:8080'"; false )
curl -c cookie-jar -F /login.user=admin -F /login.pass=pssst $(AULA_MK_CONTENT_URL)/login

content: content-login
curl -XPOST $(AULA_MK_CONTENT_URL)/api/manage-state/create-init
make content-login
curl -b cookie-jar -XPOST $(AULA_MK_CONTENT_URL)/api/manage-state/create-demo
curl -b cookie-jar -XPOST $(AULA_MK_CONTENT_URL)/api/manage-state/create-votes
rm -f cookie-jar

content-deleg:
rm -f cookie-jar
curl -c cookie-jar -F /login.user=admin -F /login.pass=pssst $(AULA_URL)/login
curl -b cookie-jar -XPOST $(AULA_URL)/api/manage-state/create-delegations
content-deleg: content-loging
make content-login
curl -b cookie-jar -XPOST $(AULA_MK_CONTENT_URL)/api/manage-state/create-delegations
rm -f cookie-jar

tags: .phony
Expand Down

0 comments on commit 2a9d35c

Please sign in to comment.