aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/config_make.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-09-28 18:33:09 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2022-10-03 21:58:01 -0400
commit3b6e0279c4afffc8b11cd7d881e0a8b6f43aa431 (patch)
treed919fa206e169300caa05bce77e6a79fd2d7803c /org/config_make.org
parentorg noweb adjustments (diff)
org nix
Diffstat (limited to 'org/config_make.org')
-rw-r--r--org/config_make.org57
1 files changed, 51 insertions, 6 deletions
diff --git a/org/config_make.org b/org/config_make.org
index 2845135..42c5fb4 100644
--- a/org/config_make.org
+++ b/org/config_make.org
@@ -69,6 +69,7 @@
<<make_version_tag>>
<<make_changelog>>
<<make_project_zip_archive>>
+<<nixGitHEADtarball>>
<<make_get_project_dependencies_github>>
<<make_dub_upgrade>>
<<make_compile_compiler_default>>
@@ -300,8 +301,6 @@ SpineSearchActionLocal := 'http://localhost/spine_search'
SpineSearchActionRemote := 'https://sisudoc.org/spine_search'
SpineCGIform := 'spine_search'
SpineSQLdb := 'spine.search.db'
-PROG_VER_GIT := '''`git describe --long --tags | sed -e "s/^[ a-z_-]\+\([0-9.]\+\)/\1/;s/\([^-]*-g\)/r\1/;s/-/./g"`'''
-PROG_VER_DECLARED := '''`cat ./views/version.txt | grep --color=never "enum" | sed 's/.\+(\([0-9]\+\),[ \t]\+\([0-9]\+\),[ \t]\+\([0-9]\+\)[ \t]*).\+/\1.\2.\3/g'`'''
hwd := `pwd`
gwd := `pwd` + "/src/ext_depends"
deps := "`ls -gx './src/ext_depends'`"
@@ -673,21 +672,67 @@ depends_set: depends_get
#+NAME: make_project_zip_archive
#+BEGIN_SRC makefile
gitZip:
- git archive -v --format=tar --prefix=`echo spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)`/ HEAD | gzip > ../spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \
+ git archive -v --format=tar --prefix=`echo spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)`/ HEAD | gzip > ./tarballGitHEAD/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \
echo "to unzip: tar -xzf spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz"
# git archive project, produce current state .tar.gz
gitArchive:
- git archive -v --format=tar --prefix=spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)/ HEAD | gzip > ../spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \
+ git archive -v --format=tar --prefix=spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT)/ HEAD | gzip > ./tarballGitHEAD/spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz && \
echo "to unzip: tar -xzf spine-$(PROG_VER_DECLARED)-tag-$(PROG_VER_GIT).tar.gz"
# git archive project, produce current state .tar.gz
# gitArchive:
-# git archive -v --format=tar --prefix="spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}/" HEAD | gzip > ../spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}.tar.gz && \
+# git archive -v --format=tar --prefix="spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}/" HEAD | gzip > ./tarballGitHEAD/spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}.tar.gz && \
# echo "to unzip: tar -xzf spine-{{PROG_VER_DECLARED}}-tag-{{PROG_VER_GIT}}.tar.gz"
#+END_SRC
+*** nixGitHEADtarball
+
+#+NAME: nixGitHEADtarball
+#+HEADER: :noweb yes
+#+BEGIN_SRC makefile
+# remove test tarball dir
+nixGitHEADtarballClean:
+ if [ -d "./tarballGitHEAD" ]; then \
+ rm -rv ./tarballGitHEAD; \
+ fi;
+
+# create test tarball
+nixGitHEADtarballTar:
+ if [ ! -d "./tarballGitHEAD" ]; then \
+ mkdir ./tarballGitHEAD; \
+ fi; \
+ git archive -v --format=tar --prefix="spine-${PROG_VER_DECLARED}/" HEAD | \
+ gzip > ./tarballGitHEAD/spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz && \
+ cp -v ./tarballGitHEAD/spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz ./tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz && \
+ echo "to unzip: tar -xzf spine-${PROG_VER_DECLARED}-tag-${PROG_VER_GIT}.tar.gz"; \
+ echo "to unzip: tar -xzf spine-${PROG_VER_DECLARED}.tar.gz"
+
+# check test tarball
+nixGitHEADtarballCheck:
+ nix flake check <<nixGitUrl>>/spine-${PROG_VER_DECLARED}.tar.gz; \
+ nix flake lock <<nixGitUrl>>/spine-${PROG_VER_DECLARED}.tar.gz; \
+ nix flake show <<nixGitUrl>>/spine-${PROG_VER_DECLARED}.tar.gz;
+
+# build test tarball
+nixGitHEADtarballBuild:
+ echo "nix build <<nixGitUrl>>/spine-${PROG_VER_DECLARED}.tar.gz#spine --print-build-logs"
+ nix build <<nixGitUrl>>/spine-${PROG_VER_DECLARED}.tar.gz#spine --print-build-logs
+ #nix build "./tarballGitHEAD/spine-${PROG_VER_DECLARED}.tar.gz#spine" --print-build-logs
+
+# clean create check & build test tarball
+nixGitHEADtarball: nixGitHEADtarballClean nixGitHEADtarballTar nixGitHEADtarballCheck nixGitHEADtarballBuild
+
+#+END_SRC
+
+**** Url nixGitHEADtarball
+
+#+NAME: nixGitUrl
+#+BEGIN_SRC makefile
+file://${hwd}/tarballGitHEAD
+#+END_SRC
+
*** _make_ commands [+2] :make:commands:
- build commands
@@ -1046,7 +1091,7 @@ rm_flakelock:
flake_update:
git add .; \
- nix flake update && \
+ nix flake lock && \
git reset HEAD flake.lock; \
cp flake.lock flake.lock_