diff --git a/CHANGES b/CHANGES index 4fba94f..b9b6078 100644 --- a/CHANGES +++ b/CHANGES @@ -1,42 +1,25 @@ -Version : - - Version bump to +Version 0.5.1: - Created jqt.make - - Migrated generation to jq - - Implementing external jq - Started blog - Segregated layouts - Changed top level object name - Introspected menu - - Some renaming - Generated sitemap - Completed makefile modules - Rules generated introspecting - Generated makefile for extra dependencies - - Renamed make modules - Generated JSON for pages - - More modules at make.d - use addsuffix function - Enabled second expansion - Generate site.json - - New name inside introspect - - Renaming macros - - Exploring introspection - New target "metadata" - Protected target clobber - Implemented default globals - - Make files reorganized - - Makefile subdivided in fragments - Added favicon - General solution for assets - - Big makefile reorganization - New styles organization - - Better filenames - Restructuring docs - - Merge branch 'mac' - New tests - - Content macros moved - - New tests - - Moved install documentation - Created directory for macros - Enhanced README diff --git a/VERSION b/VERSION index e69de29..5d4294b 100644 --- a/VERSION +++ b/VERSION @@ -0,0 +1 @@ +0.5.1 \ No newline at end of file diff --git a/bin/jqt b/bin/jqt index d413d86..f2b50b0 100755 --- a/bin/jqt +++ b/bin/jqt @@ -2,7 +2,7 @@ # jqt - jq based web template engine -declare -r VERSION='''''0.5.0''0.4.0' +declare -r VERSION='0.5.1' declare -r DATADIR='/usr/local/share' declare -r SELF=${0##*/} @@ -529,7 +529,7 @@ function usage function help { cat <<'EOF' -jqt - jq based web template engine [version ] +jqt - jq based web template engine [version 0.5.1] Usage: jqt [-h | --help | -p | -V | --version] jqt [options] < infile > result jqt [options] infile > result diff --git a/bump-version.sh b/bump-version.sh index f844057..120dd40 100755 --- a/bump-version.sh +++ b/bump-version.sh @@ -24,7 +24,11 @@ if [[ -f VERSION ]]; then V_PATCH=0 declare -r SUGGESTED_VERSION="${V_MAJOR}.${V_MINOR}.${V_PATCH}" read 1>&2 -p "Enter a version number [${SUGGESTED_VERSION}]: " - [[ -z $REPLY ]] && NEXT_VERSION=${SUGGESTED_VERSION} + if [[ -z $REPLY ]]; then + NEXT_VERSION=${SUGGESTED_VERSION} + else + NEXT_VERSION=${REPLY} + fi echo 1>&2 "Will set new version to be ${NEXT_VERSION}" echo -n ${NEXT_VERSION} > VERSION { echo "Version ${NEXT_VERSION}:" @@ -35,7 +39,7 @@ if [[ -f VERSION ]]; then cp /tmp/$$-changes CHANGES rm /tmp/$$-changes git add CHANGES VERSION - sed -i "s/^declare -r VERSION=/&'${NEXT_VERSION}'/" bin/jqt + sed -i "s/^declare -r VERSION=$/declare -r VERSION=${NEXT_VERSION}'/" bin/jqt sed -i "s/\[version .*\]/[version ${NEXT_VERSION}]/" bin/jqt sed -i "s/^Version *:=.*/Version := ${NEXT_VERSION}/" docs/Makefile git commit -am "Version bump to ${NEXT_VERSION}" diff --git a/docs/Makefile b/docs/Makefile index a2507d1..26d3159 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -10,7 +10,7 @@ include make.d/prelude.make # jqt version -Version := +Version := 0.5.1 # Metadata directory Metadata := .meta diff --git a/docs/jqt.make b/docs/jqt.make index e6d4fd1..70ef34d 100644 --- a/docs/jqt.make +++ b/docs/jqt.make @@ -1,17 +1,9 @@ ######################################################################## # Specific makefile for this web site -######################################################################## -# Options for `jqt`. -JQTFLAGS += \ - -5 \ - --toc-depth=4 \ - -I./ \ - -msite:$(Metadata)/config.json \ - -msections:$(Metadata)/sections.json \ - -msnippets:$(Metadata)/snippets.json \ - -iblocks/filters \ - -j'$$'pages:$(Metadata)/pages \ +######################################################################## +# Data files +######################################################################## # Snippets $(Metadata)/snippets.json: $(Data)/snippets.yaml \ @@ -19,11 +11,25 @@ $(Metadata)/snippets.json: $(Data)/snippets.yaml \ $(info ==> $@) @jqt -T < $< | yaml2json > $@ -clean:: - @rm -f $(Metadata)/snippets.json +$(DestinationPages): $(Metadata)/snippets.json + +JQTFLAGS += -msnippets:$(Metadata)/snippets.json + +clean:: ; @rm -f $(Metadata)/snippets.json + +######################################################################## +# Build pages options +######################################################################## # Extra dependencies -$(DestinationPages): $(Metadata)/snippets.json # $(Blocks)/filters.jq $(Blocks)/*/*.html $(Blocks)/*/*/*.html +#?$(DestinationPages): $(Blocks)/filters.jq $(Blocks)/*/*.html $(Blocks)/*/*/*.html + +# Options for `jqt`. +JQTFLAGS += \ + -5 \ + --toc-depth=4 \ + -iblocks/filters \ + -msections:$(Metadata)/sections.json \ ######################################################################## # Generate man page for jqt diff --git a/docs/make.d/pages.make b/docs/make.d/pages.make index 8bc60b9..35ec960 100644 --- a/docs/make.d/pages.make +++ b/docs/make.d/pages.make @@ -29,12 +29,17 @@ $(Metadata)/phase3.make: $(Metadata)/pages.json $(Metadata)/sections.json make.d < $< > $@ # -# Variables used when building HTML files in phase3.make. +# Variables used in $(Metadata)/phase3.make. # +JQTFLAGS = \ + -I./ \ + -msite:$(Metadata)/config.json \ + -j'$$'pages:$(Metadata)/pages \ + JQT = jqt $(JQTFLAGS) -define DETAILS = +define DETAILS := sed -e 's/^
<\/details><\/p>/<\/details>/' \
-e 's/^/
/' \
diff --git a/docs/make.d/pathnames.make b/docs/make.d/pathnames.make
index 9ab665d..fe8b23b 100644
--- a/docs/make.d/pathnames.make
+++ b/docs/make.d/pathnames.make
@@ -61,6 +61,18 @@ define BUILD_JSON
--from-file make.d/phase21.jq
endef
+########################################################################
+# Extra dependencies
+########################################################################
+
+$(DestinationPages): $(Destination)/%.html : $(Metadata)/pages/%.json
+$(DestinationPages): $(Layouts)/default.html
+
+$(MetadataPages): $(Metadata)/config.json
+
+$(DestinationPages): | $$(dir $$@)
+$(MetadataPages): | $$(dir $$@)
+
########################################################################
# Rules for directories
########################################################################
@@ -87,18 +99,6 @@ $(Metadata)/sections.json: $(Metadata)/pages.json
$(info ==> $@)
@jq '[.[].section] | unique | map(select(.))' < $< > $@
-########################################################################
-# Extra dependencies
-########################################################################
-
-$(DestinationPages): $(Destination)/%.html : $(Metadata)/pages/%.json
-$(DestinationPages): $(Layouts)/default.html
-
-$(MetadataPages): $(Metadata)/config.json
-
-$(DestinationPages): | $$(dir $$@)
-$(MetadataPages): | $$(dir $$@)
-
endif
# vim:ai:sw=8:ts=8:noet:fileencoding=utf8:syntax=make