Skip to content
Snippets Groups Projects
Verified Commit a9fbf0ef authored by Jake's avatar Jake
Browse files

updated Makefile

parent 70a927f3
No related branches found
No related tags found
No related merge requests found
Pipeline #512881 passed
...@@ -16,7 +16,7 @@ site: ...@@ -16,7 +16,7 @@ site:
CHECKOUT_BRANCH: $UPSTREAM_BRANCH CHECKOUT_BRANCH: $UPSTREAM_BRANCH
- when: on_success - when: on_success
before_script: before_script:
- apt-get update && apt-get install -y --no-install-recommends python3-pip python3 make git wget software-properties-common - apt-get update && apt-get install -y --no-install-recommends python3-pip python3 python3-venv make git wget software-properties-common
- pip3 install -r requirements.txt - pip3 install -r requirements.txt
- "echo \"CHECKOUT_BRANCH: $CHECKOUT_BRANCH UPSTREAM_BRANCH: $UPSTREAM_BRANCH\"" - "echo \"CHECKOUT_BRANCH: $CHECKOUT_BRANCH UPSTREAM_BRANCH: $UPSTREAM_BRANCH\""
- git clone https://gitlab.gwdg.de/GAUMI-fginfo/fg-website-data.git content --branch $CHECKOUT_BRANCH - git clone https://gitlab.gwdg.de/GAUMI-fginfo/fg-website-data.git content --branch $CHECKOUT_BRANCH
...@@ -30,7 +30,7 @@ site: ...@@ -30,7 +30,7 @@ site:
docs: docs:
stage: build stage: build
before_script: before_script:
- apt-get update && apt-get install -y --no-install-recommends python3-pip python3 make git wget software-properties-common - apt-get update && apt-get install -y --no-install-recommends python3-pip python3 python3-venv make git wget software-properties-common
- pip3 install -r requirements.txt - pip3 install -r requirements.txt
script: script:
- make docs - make docs
......
...@@ -5,20 +5,26 @@ html: docs build ...@@ -5,20 +5,26 @@ html: docs build
publish: build publish: build
.PHONY: build .PHONY: build
build: pandoc mathjax build: venv/bin/activate pandoc mathjax
cd fgs && python3 __main__.py "../content" "../output" "../theme" "../config.json" "../lang.json" . venv/bin/activate && cd fgs && python3 __main__.py "../content" "../output" "../theme" "../config.json" "../lang.json"
.PHONY: docs .PHONY: docs
docs: pandoc mathjax docs: venv/bin/activate pandoc mathjax
cd fgs && python3 __main__.py "../docs" "../docs-output" "../theme" "../config.json" "../lang.json" . venv/bin/activate && cd fgs && python3 __main__.py "../docs" "../docs-output" "../theme" "../config.json" "../lang.json"
.PHONY: mathjax .PHONY: mathjax
mathjax: mathjax:
git submodule init
git submodule update
[ ! -d output/mathjax ] && mkdir -p output && cp -vr mathjax/es5 output/mathjax || true [ ! -d output/mathjax ] && mkdir -p output && cp -vr mathjax/es5 output/mathjax || true
.PHONY: devserver .PHONY: devserver
devserver: devserver: venv/bin/activate
python -m http.server 8000 . venv/bin/activate && python3 -m http.server 8000
.PHONY: clean
clean:
$(RM) -r venv output
.PHONY: pandoc .PHONY: pandoc
pandoc: pandoc-2.18 pandoc: pandoc-2.18
...@@ -32,4 +38,7 @@ pandoc-2.18: ...@@ -32,4 +38,7 @@ pandoc-2.18:
|| true || true
[ -x pandoc-2.18/bin/pandoc ] [ -x pandoc-2.18/bin/pandoc ]
venv/bin/activate: requirements.txt
python3 -m venv venv
. venv/bin/activate && pip3 install -r requirements.txt
...@@ -24,10 +24,9 @@ Um an der Seite zu arbeiten ist es meistens sinnvoll diese auch lokal zu hosten. ...@@ -24,10 +24,9 @@ Um an der Seite zu arbeiten ist es meistens sinnvoll diese auch lokal zu hosten.
Die folgenden Befehle sind für Ubuntu 20.04 LTS (Focal) gedacht. Die folgenden Befehle sind für Ubuntu 20.04 LTS (Focal) gedacht.
1. Pakete installieren: `apt-get update && apt-get install -y --no-install-recommends python3-pip python3 make git wget software-properties-common` 1. Pakete installieren: `apt-get update && apt-get install -y --no-install-recommends python3-pip python3 python3-venv make git wget software-properties-common`
1. Metarepo klonen: `git clone --recurse-submodules git@gitlab.gwdg.de:GAUMI-fginfo/fg-website.git` 1. Metarepo klonen: `git clone git@gitlab.gwdg.de:GAUMI-fginfo/fg-website.git`
1. `cd fg-website` 1. `cd fg-website`
1. Python Pakete installieren: `pip3 install -r requirements.txt`
1. Inhaltsrepo klonen: `git clone git@gitlab.gwdg.de:GAUMI-fginfo/fg-website-data.git content` 1. Inhaltsrepo klonen: `git clone git@gitlab.gwdg.de:GAUMI-fginfo/fg-website-data.git content`
### (Automatisch) Bauen und Hosten ### (Automatisch) Bauen und Hosten
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment