From 4e6b009500c1900e9e83dfb25b174cb08337edc8 Mon Sep 17 00:00:00 2001 From: Ralph Amissah Date: Tue, 20 Jun 2023 15:19:06 -0400 Subject: makefile add gitZip, git archive --- org/config_git.org | 4 ++++ org/config_make.org | 10 ++++++++++ 2 files changed, 14 insertions(+) (limited to 'org') diff --git a/org/config_git.org b/org/config_git.org index 07b7a1f..a9ad199 100644 --- a/org/config_git.org +++ b/org/config_git.org @@ -90,6 +90,10 @@ tmp/** #+BEGIN_SRC sh /org export-ignore .gitattributes export-ignore +/.dub export-ignore +/.direnv export-ignore +/*_ export-ignore +,*_ export-ignore #.gitignore export-ignore tangle export-ignore #flake.lock export-ignore diff --git a/org/config_make.org b/org/config_make.org index 25fae16..145fcbe 100644 --- a/org/config_make.org +++ b/org/config_make.org @@ -54,6 +54,8 @@ include .envrc-local #SpineSearchAction := 'https://sisudoc.org/spine_search' #SpineCGIform := 'spine_search' #SpineSQLdb := 'spine.search.db' +PROG_VER_GIT :=$(shell echo `git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`) +PROG_VER_DECLARED :=$(shell echo `cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`) default: flake-check @@ -137,4 +139,12 @@ set_depends: get_depends cp-cgi: sudo cp -vi /var/www/cgi/cgi-bin/spine_search /var/www/cgi/cgi-bin/spine_search_old && \ sudo cp -vi result/share/cgi-bin/spine_search /var/www/cgi/cgi-bin/spine_search + +# git archive +gitZip: + if [ ! -d "./tarballGitHEAD" ]; then \ + mkdir ./tarballGitHEAD; \ + fi; \ + git archive -v --format=tar --prefix=`echo spine-search-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)`/ HEAD | gzip > ./tarballGitHEAD/spine-search-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \ + echo "to unzip: tar -xzf spine-search-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz" #+END_SRC -- cgit v1.2.3