summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-06-20 15:19:06 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2023-06-20 15:19:06 -0400
commit4e6b009500c1900e9e83dfb25b174cb08337edc8 (patch)
tree66cb683a94adbf8eee7de981181865825629dbe8
parentflake.nix offer build bypass of ldc overlay (diff)
makefile add gitZip, git archive
-rw-r--r--.gitattributes4
-rw-r--r--flake.lock12
-rw-r--r--makefile10
-rw-r--r--org/config_git.org4
-rw-r--r--org/config_make.org10
5 files changed, 34 insertions, 6 deletions
diff --git a/.gitattributes b/.gitattributes
index 01262ec..c452c0e 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,5 +1,9 @@
/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/flake.lock b/flake.lock
index 11433d2..a1a200a 100644
--- a/flake.lock
+++ b/flake.lock
@@ -5,11 +5,11 @@
"systems": "systems"
},
"locked": {
- "lastModified": 1685518550,
- "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
+ "lastModified": 1687171271,
+ "narHash": "sha256-BJlq+ozK2B1sJDQXS3tzJM5a+oVZmi1q0FlBK/Xqv7M=",
"owner": "numtide",
"repo": "flake-utils",
- "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
+ "rev": "abfb11bd1aec8ced1c9bb9adfe68018230f4fb3c",
"type": "github"
},
"original": {
@@ -20,11 +20,11 @@
},
"nixpkgs": {
"locked": {
- "lastModified": 1687103638,
- "narHash": "sha256-dwy/TK6Db5W7ivcgmcxUykhFwodIg0jrRzOFt7H5NUc=",
+ "lastModified": 1687245362,
+ "narHash": "sha256-+f9tH+k3u9lSS136M2LCsl5NJTNPvhmHEiVOcypiu1E=",
"owner": "NixOS",
"repo": "nixpkgs",
- "rev": "91430887645a0953568da2f3e9a3a3bb0a0378ac",
+ "rev": "205ee073b053fc4d87d5adf2ebd44ebbef7bca4d",
"type": "github"
},
"original": {
diff --git a/makefile b/makefile
index cf4b608..7589a63 100644
--- a/makefile
+++ b/makefile
@@ -5,6 +5,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
@@ -88,3 +90,11 @@ 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"
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