Compare commits

..

2 Commits

Author SHA1 Message Date
731301e072 Merge branch 'develop' into 'master'
CI add artifacts

See merge request !2
2017-04-02 20:48:25 +02:00
33fcd63f9e Merge branch 'develop' into 'master'
Develop

See merge request !1
2017-04-02 20:40:23 +02:00
3 changed files with 13 additions and 42 deletions

4
.gitignore vendored
View File

@ -3,6 +3,6 @@
build
*.o
*.min.js
bouquins
/bouquins
externals
bouquins*.tar.gz
ksql.h

View File

@ -4,10 +4,14 @@ stages:
build:
stage: build
script:
- make package
- make
artifacts:
paths:
- build/*
- '*.o'
- bouquins
- '*.min.js'
- '*.html'
- '*.min.js'
expire_in: 1 hour
tags:
- kcgi

View File

@ -60,19 +60,11 @@ sinclude GNUmakefile.local
DATABASE = metadata.db
OBJS = db.o db_author.o db_book.o db_series.o json.o main.o
EXT = externals
BOOTSTRAP_VERSION = 3.3.7
BOOTSTRAP_DIST = bootstrap-$(BOOTSTRAP_VERSION)-dist
BOOTSTRAP_URL = https://github.com/twbs/bootstrap/releases/download/v$(BOOTSTRAP_VERSION)/$(BOOTSTRAP_DIST).zip
BOOTSTRAP_TMP_ZIP = $(EXT)/bootstrap.zip
VUE_URL = https://vuejs.org/js/vue.min.js
VUEJS = $(EXT)/vue.min.js
HTMLS = index.html book.html author.html series.html search.html
JSMINS = index.min.js book.min.js author.min.js series.min.js search.min.js $(VUEJS)
CSS = $(EXT)/$(BOOTSTRAP_DIST)/css/bootstrap.min.css
FONTS = $(EXT)/$(BOOTSTRAP_DIST)/fonts/*
JSMINS = index.min.js book.min.js author.min.js series.min.js search.min.js
EXTJS = externals/vue.min.js
CSS = externals/bootstrap.min.css
FONTS = externals/fonts/*
CFLAGS += -g -W -Wall -O2 $(SECURE)
CFLAGS += -DLOGFILE=\"$(LOGFILE)\"
@ -88,35 +80,10 @@ all: $(TARGET) $(HTMLS) $(JSMINS)
api: swagger.json
$(BOOTSTRAP_TMP_ZIP):
fetch -o $(BOOTSTRAP_TMP_ZIP) $(BOOTSTRAP_URL)
$(EXT)/$(BOOTSTRAP_DIST): $(BOOTSTRAP_TMP_ZIP)
unzip -d $(EXT) $(BOOTSTRAP_TMP_ZIP)
$(VUEJS):
fetch -o $(VUEJS) $(VUE_URL)
$(EXT): $(EXT)/$(BOOTSTRAP_DIST) $(VUEJS)
packwww: $(EXT) $(HTMLS) $(JSMINS)
mkdir -p build build/css build/fonts build/js
cp $(HTMLS) build
cp $(JSMINS) $(VUEJS) build/js
cp $(CSS) build/css
cp $(FONTS) build/fonts
packcgi: $(TARGET)
mkdir -p build/cgi-bin
cp $(TARGET) build/cgi-bin
cp $(OBJS) build/cgi-bin
package: packcgi packwww
installwww: all
mkdir -p $(HTDOCS) $(HTDOCS)/css $(HTDOCS)/fonts $(HTDOCS)/js
install -m 0444 $(HTMLS) $(HTDOCS)
install -m 0444 $(JSMINS) $(HTDOCS)/js
install -m 0444 $(JSMINS) $(EXTJS) $(HTDOCS)/js
install -m 0444 $(CSS) $(HTDOCS)/css
install -m 0444 $(FONTS) $(HTDOCS)/fonts