Browse Source

library update (84342cb) on Thu Jun 24 07:56:47 AM CEST 2021

master
Dominique M. Lipitz 3 years ago
committed by Brooke L. Rediker
parent
commit
e2322175d1
  1. 3
      .gitmodules
  2. 40
      bin/toychain

3
.gitmodules

@ -3,4 +3,7 @@
url = http://holoGit.ml.ipns.localhost:8080/wpreisser/websocketd.git url = http://holoGit.ml.ipns.localhost:8080/wpreisser/websocketd.git
[submodule "lib"] [submodule "lib"]
path = lib path = lib
url = https://ipfs.blockringtm.ml/ipns/hologit.ml/michelc/blockchain-lib.git
[submodule "dweb-lib"]
path = dweb-lib
url = https://hologit-ml.ipns.dweb.link/michelc/blockchain-lib.git url = https://hologit-ml.ipns.dweb.link/michelc/blockchain-lib.git

40
bin/toychain

@ -21,6 +21,8 @@ $pgm sync \$name # to synchronize a \$name node
$pgm update \$tag # to synchronize a \$tag node $pgm update \$tag # to synchronize a \$tag node
$pgm test \$tc # to run the \$tc test case $pgm test \$tc # to run the \$tc test case
$pgm debug \$cmd # to running \$cmd in debug mode $pgm debug \$cmd # to running \$cmd in debug mode
$pgm install # to install dependant libraries essentially CPAN perl modules
$pgm ship # to package and ship libraries (i.e. push to holo-git)
EOT EOT
@ -39,6 +41,8 @@ case $what in
test) tctest $@;; test) tctest $@;;
debug) tcdebug $@;; debug) tcdebug $@;;
support) echo "do you need help with $pgm ?\n- call our support line at https://www.drit.ml\n-- Dr I·T";; support) echo "do you need help with $pgm ?\n- call our support line at https://www.drit.ml\n-- Dr I·T";;
install) tcinstall $@;;
ship) tcship $@;;
log) tclog;; log) tclog;;
*) tcrun $@;; *) tcrun $@;;
esac esac
@ -77,14 +81,16 @@ tcupdate() {
tag=$2 tag=$2
echo "$pgm: updating daemon with tag $tag..." echo "$pgm: updating daemon with tag $tag..."
top=$(git rev-parse --show-toplevel) top=$(git rev-parse --show-toplevel)
echo // updating $top
git pull --ff-only --recurse-submodules=yes origin master 2>&1 | tee transcript.log
date +%s >> transcript.log
echo // updating $top >> transcript.log
git pull --ff-only --recurse-submodules=yes origin master 2>&1 | tee -a transcript.log
echo // checking out $tag echo // checking out $tag
git checkout $tag 2>&1 | tee -a transcript.log git checkout $tag 2>&1 | tee -a transcript.log
git log -1 git log -1
cd $top/lib cd $top/lib
echo // updating $top/lib echo // updating $top/lib
git pull --ff-only origin master 2>&1 | tee -a transcript.log git pull --ff-only origin master 2>&1 | tee -a transcript.log
echo . >> transcript.log
git log -1 git log -1
echo "---" echo "---"
} }
@ -115,18 +121,46 @@ tcdebug() {
echo "---" echo "---"
} }
tcinstall() {
echo "$pgm: installing dependancies ..."
echo "---"
}
tcversion() { tcversion() {
top=$(git rev-parse --show-toplevel) top=$(git rev-parse --show-toplevel)
gitid0=$(git rev-parse --short HEAD) gitid0=$(git rev-parse --short HEAD)
date +%s >> transcript.log
git pull --ff-only --recurse-submodules=yes origin master 1>> transcript.log 2>&1 git pull --ff-only --recurse-submodules=yes origin master 1>> transcript.log 2>&1
git checkout $tag 1>> transcript.log 2>&1 git checkout $tag 1>> transcript.log 2>&1
gitid1=$(git rev-parse --short HEAD) gitid1=$(git rev-parse --short HEAD)
if [ "x$gitid0" != "x$gitid1" ]; then gitid1=$gitdi0-$gitid1; fi
if [ "x$gitid0" != "x$gitid1" ]; then gitid1=$gitid0-$gitid1; fi
cd $top/lib cd $top/lib
git pull --ff-only origin master 1>> transcript.log 2>&1 git pull --ff-only origin master 1>> transcript.log 2>&1
gitid2=$(git rev-parse --short HEAD) gitid2=$(git rev-parse --short HEAD)
echo Version: $gitid1-$gitid2 echo Version: $gitid1-$gitid2
echo Version: $gitid1-$gitid2 >> transcript.log
echo . >> transcript.log
}
tcship() { # only for internal use (i.e. Dr I·T)
date=$(date)
top=$(git rev-parse --show-toplevel)
cd $top/lib
gituser
git commit -a -m "snapshot $date"
if which holo-git-push 2> /dev/null; then
holo-git-push
else
git push origin master
fi
gitid=$(git rev-parse --short HEAD)
cd $top
gituser
git commit -a -m "library update ($gitid) on $date"
git push origin master
git push keybase master
git push toptal master
} }

Loading…
Cancel
Save