mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-01-18 16:47:42 +01:00
build: use most recent tag as cssversion
the value is fixed in html files though, hopefully this will the light the fire under me to make sure I keep changing the version with updates.
This commit is contained in:
7
Makefile
7
Makefile
@@ -9,7 +9,7 @@ else
|
||||
endif
|
||||
GOBINARY ?= go
|
||||
|
||||
CSSVERSION ?= v0.6.0
|
||||
CSSVERSION ?= $(shell git describe --tags --abbrev=0)
|
||||
CSS_BUNDLE = $(DATA)/web/css/$(CSSVERSION)bundle.css
|
||||
|
||||
VERSION ?= $(shell git describe --exact-match HEAD 2> /dev/null || echo vgit)
|
||||
@@ -160,15 +160,18 @@ $(VARIANTS_TARGET): $(VARIANTS_SRC)
|
||||
|
||||
ICON_SRC = node_modules/remixicon/fonts/remixicon.css node_modules/remixicon/fonts/remixicon.woff2
|
||||
ICON_TARGET = $(ICON_SRC:node_modules/remixicon/fonts/%=$(DATA)/web/css/%)
|
||||
SYNTAX_SRC = node_modules/highlight.js/styles/default.min.css
|
||||
SYNTAX_TARGET = $(DATA)/web/css/$(CSSVERSION)highlightjs.css
|
||||
CSS_SRC = $(wildcard css/*.css)
|
||||
CSS_TARGET = $(DATA)/web/css/part-bundle.css
|
||||
CSS_FULLTARGET = $(CSS_BUNDLE)
|
||||
ALL_CSS_SRC = $(ICON_SRC) $(CSS_SRC)
|
||||
ALL_CSS_SRC = $(ICON_SRC) $(CSS_SRC) $(SYNTAX_SRC)
|
||||
ALL_CSS_TARGET = $(ICON_TARGET)
|
||||
|
||||
$(CSS_FULLTARGET): $(TYPESCRIPT_TARGET) $(VARIANTS_TARGET) $(ALL_CSS_SRC) $(wildcard html/*.html)
|
||||
$(info copying fonts)
|
||||
cp -r node_modules/remixicon/fonts/remixicon.css node_modules/remixicon/fonts/remixicon.woff2 $(DATA)/web/css/
|
||||
cp -r $(SYNTAX_SRC) $(SYNTAX_TARGET)
|
||||
$(info bundling css)
|
||||
rm -f $(CSS_TARGET) $(CSS_FULLTARGET)
|
||||
$(ESBUILD) --bundle css/base.css --outfile=$(CSS_TARGET) --external:remixicon.css --external:../fonts/hanken* --minify
|
||||
|
||||
@@ -34,4 +34,4 @@ fi
|
||||
JFA_GO_VERSION=$(git describe --exact-match HEAD 2> /dev/null || echo 'vgit')
|
||||
TIMEOUT=60m
|
||||
|
||||
JFA_GO_CSS_VERSION="v0.6.0" JFA_GO_NFPM_EPOCH=$(git rev-list --all --count) JFA_GO_BUILD_TIME=$(date +%s) JFA_GO_BUILT_BY=${JFA_GO_BUILT_BY:-"???"} JFA_GO_VERSION="$(echo $JFA_GO_VERSION | sed 's/v//g')" $@ --timeout $TIMEOUT
|
||||
JFA_GO_CSS_VERSION="$(git describe --tags --abbrev=0)" JFA_GO_NFPM_EPOCH=$(git rev-list --all --count) JFA_GO_BUILD_TIME=$(date +%s) JFA_GO_BUILT_BY=${JFA_GO_BUILT_BY:-"???"} JFA_GO_VERSION="$(echo $JFA_GO_VERSION | sed 's/v//g')" $@ --timeout $TIMEOUT
|
||||
|
||||
Reference in New Issue
Block a user