Commit b09b01e8 authored by chrissi^'s avatar chrissi^

Makefile: split into minimal and full env

Signed-off-by: chrissi^'s avatarChris Fiege <chris@tinyhost.de>
parent e6ff2295
Pipeline #1294 passed with stage
in 17 seconds
...@@ -6,7 +6,6 @@ deployment: ...@@ -6,7 +6,6 @@ deployment:
script: script:
- cd flamingo - cd flamingo
- echo $CI_COMMIT_REF_SLUG > REF_SLUG - echo $CI_COMMIT_REF_SLUG > REF_SLUG
- make env
- make html - make html
- touch /var/www/$CI_COMMIT_REF_SLUG/htdocs/foo - touch /var/www/$CI_COMMIT_REF_SLUG/htdocs/foo
- rm -r /var/www/$CI_COMMIT_REF_SLUG/htdocs/* - rm -r /var/www/$CI_COMMIT_REF_SLUG/htdocs/*
......
...@@ -13,15 +13,23 @@ FLAMINGO_SERVER_ARGS=$(FLAMINGO_ARGS) --port=$(WEBSERVER_PORT) --host=$(WEBSERVE ...@@ -13,15 +13,23 @@ FLAMINGO_SERVER_ARGS=$(FLAMINGO_ARGS) --port=$(WEBSERVER_PORT) --host=$(WEBSERVE
all: server all: server
# setup / clean ############################################################### # setup / clean ###############################################################
$(PYTHON_VENV)/.created: $(PYTHON_VENV)/.created.deploy:
rm -rf $(PYTHON_VENV) && \ rm -rf $(PYTHON_VENV) && \
$(PYTHON) -m venv $(PYTHON_VENV) && \ $(PYTHON) -m venv $(PYTHON_VENV) && \
. $(PYTHON_VENV)/bin/activate && \ . $(PYTHON_VENV)/bin/activate && \
pip install -r ./REQUIREMENTS-deploy.txt > $(PYTHON_VENV)/build.log 2>&1 && \ pip install -r ./REQUIREMENTS-deploy.txt > $(PYTHON_VENV)/build.log 2>&1 && \
(date > $(PYTHON_VENV)/.created) || \ (date > $(PYTHON_VENV)/.created.deploy) || \
(echo "\e[31m"; cat $(PYTHON_VENV)/build.log; echo "\e[0m"; exit 1) (echo "\e[31m"; cat $(PYTHON_VENV)/build.log; echo "\e[0m"; exit 1)
env: $(PYTHON_VENV)/.created deployenv: $(PYTHON_VENV)/.created.deploy
$(PYTHON_VENV)/.created.full:
. $(PYTHON_VENV)/bin/activate && \
pip install -r ./REQUIREMENTS-full.txt > $(PYTHON_VENV)/build.log 2>&1 && \
(date > $(PYTHON_VENV)/.created.full) || \
(echo "\e[31m"; cat $(PYTHON_VENV)/build.log; echo "\e[0m"; exit 1)
env: deployenv $(PYTHON_VENV)/.created.full
clean: clean:
rm -rf $(FLAMINGO_OUTPUT) rm -rf $(FLAMINGO_OUTPUT)
...@@ -31,7 +39,7 @@ distclean: ...@@ -31,7 +39,7 @@ distclean:
# build ####################################################################### # build #######################################################################
html: env html: deployenv
. $(PYTHON_VENV)/bin/activate && \ . $(PYTHON_VENV)/bin/activate && \
flamingo build $(FLAMINGO_ARGS) flamingo build $(FLAMINGO_ARGS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment