From 5c4219b8ae2d14a6bd12e895e2ce1b2503fffd4d Mon Sep 17 00:00:00 2001 From: Christopher Dunn Date: Sun, 10 Jan 2021 00:17:35 -0600 Subject: [PATCH] Update version in dox We should automate this, but for now we can at least update: make -f dev.makefile update-version make -f dev.makefile dox # Then, go to jsoncpp-doc repo, add, and push. * https://github.com/open-source-parsers/jsoncpp-docs/issues/2 --- .gitignore | 3 +++ dev.makefile | 4 +++- get_version.pl | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 get_version.pl diff --git a/.gitignore b/.gitignore index 2444e6a..9682782 100644 --- a/.gitignore +++ b/.gitignore @@ -52,3 +52,6 @@ compile_commands.json # DS_Store .DS_Store + +# temps +/version diff --git a/dev.makefile b/dev.makefile index 1a4be6a..545ff27 100644 --- a/dev.makefile +++ b/dev.makefile @@ -1,9 +1,11 @@ # This is only for jsoncpp developers/contributors. # We use this to sign releases, generate documentation, etc. -VER?=$(shell cat version.txt) +VER?=$(shell cat version) default: @echo "VER=${VER}" +update-version: + perl get_version.pl meson.build >| version sign: jsoncpp-${VER}.tar.gz gpg --armor --detach-sign $< gpg --verify $<.asc diff --git a/get_version.pl b/get_version.pl new file mode 100644 index 0000000..19b6a54 --- /dev/null +++ b/get_version.pl @@ -0,0 +1,5 @@ +while (<>) { + if (/version : '(.+)',/) { + print "$1"; + } +}