From fd79359c4eff20880ebf5439a3a3a26fd679d3a0 Mon Sep 17 00:00:00 2001 From: Christian Krause <christian.krause@idiv.de> Date: Fri, 7 Jun 2019 09:58:57 +0200 Subject: [PATCH] adds title target --- .gitlab-ci.yml | 5 +++-- Makefile | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b448cf4..8aa1697 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,14 +23,15 @@ build: deploy: stage: deploy script: + - TITLE=$(make title) - make - >- curl -f -v -u "$NEXTCLOUD_SHARE:$NEXTCLOUD_PW" - -T title.pdf + -T "$TITLE.pdf" -H 'X-Requested-With: XMLHttpRequest' -H 'X-Method-Override: PUT' - https://portal.idiv.de/nextcloud/public.php/webdav/title.pdf + "https://portal.idiv.de/nextcloud/public.php/webdav/$TITLE.pdf" environment: name: production only: diff --git a/Makefile b/Makefile index aeb9510..533eb73 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +# do not use spaces here, instead use either +# - dashes, as in my-awesome-title, or +# - underscores, as in my_awesome_title TITLE = title PANDOC = pandoc @@ -31,6 +34,9 @@ check: spellcheck spellcheck: mdspell --en-us -anrx $(SOURCES_MD) +title: + @echo $(TITLE) + clean: @for dir in $(SUBDIRS); do \ $(MAKE) -C $$dir $@; \ @@ -43,4 +49,5 @@ clean: clean \ default \ subdirs \ + title \ $(SUBDIRS) \ -- GitLab