From 2a75395f6a03bdfba08be8b4e75430b37b2972a9 Mon Sep 17 00:00:00 2001 From: Joe Carstairs Date: Sun, 28 Jun 2026 21:55:08 +0100 Subject: [PATCH] adds flatnotes --- .gitignore | 1 + Makefile | 3 ++- flatnotes/Makefile | 15 +++++++++++++++ flatnotes/version | 1 + 4 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 flatnotes/Makefile create mode 100644 flatnotes/version diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6322a26 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +flatnotes-src diff --git a/Makefile b/Makefile index 1e33c1b..b41fc84 100755 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ tag_alpine_version_parts := alpine $(addprefix alpine,$(call all_versions,$(ALPI tag_app_version_parts = $(call all_versions,$(app_version)) tags = $(tag_app_version_parts) $(tag_alpine_version_parts)\ $(foreach app_part,$(tag_app_version_parts),$(addprefix $(app_part)-,$(tag_alpine_version_parts))) +docker_context = $(if $(DOCKER_CONTEXT_$(target)),$(DOCKER_CONTEXT_$(target)),$(target)) define build_rule = .PHONY: build_$(target) @@ -21,7 +22,7 @@ build_$(target): -t $(container_image_name):latest \ --build-arg "ALPINE_VERSION=$(ALPINE_VERSION)" \ --build-arg "VERSION=$(app_version)" \ - $(target) + $(docker_context) endef define tag_rule = diff --git a/flatnotes/Makefile b/flatnotes/Makefile new file mode 100644 index 0000000..1982dc8 --- /dev/null +++ b/flatnotes/Makefile @@ -0,0 +1,15 @@ +flatnotes_version = $(let target,flatnotes,$(app_version)) +DOCKER_CONTEXT_flatnotes = flatnotes-src/flatnotes-$(flatnotes_version) + +.PHONY: prepare_flatnotes +prepare_flatnotes: flatnotes-src + +flatnotes-src: flatnotes/version + wget -O- https://github.com/dullage/flatnotes/archive/refs/tags/v$(flatnotes_version).tar.gz \ + | gzip -d | tar -xf - + rm -rf flatnotes-src + mkdir flatnotes-src + mv flatnotes-$(flatnotes_version) flatnotes-src + +clean_flatnotes: + rm -rf flatnotes-src flatnotes.tar flatnotes.tar.gz diff --git a/flatnotes/version b/flatnotes/version new file mode 100644 index 0000000..c8f1d09 --- /dev/null +++ b/flatnotes/version @@ -0,0 +1 @@ +5.5.4