From 08eb9ae918cd4201ad44652577d4a282bacddcf4 Mon Sep 17 00:00:00 2001 From: Ciprian Dorin Craciun Date: Sat, 10 Aug 2019 20:49:04 +0300 Subject: [PATCH] [scripts] Add `hello-world` example scriptlets --- .z-run | 47 +++++++++++++++++++++++++++++++++++++---------- 1 file changed, 37 insertions(+), 10 deletions(-) diff --git a/.z-run b/.z-run index 18ee7fe..13cba74 100644 --- a/.z-run +++ b/.z-run @@ -7,6 +7,7 @@ ::// execute / ... ::// benchmark / ... +::// examples / ... ::// documentation / ... ::// workspace / ... @@ -74,15 +75,14 @@ !! -<< go / build / server / release / publish +<< go / build / server / publish test "${#}" -eq 0 - printf -- '[ii] building...\n' >&2 "${ZRUN[@]}" ':: go / build / server / release' if test ! -e ./.outputs/publish ; then mkdir -- ./.outputs/publish fi - if test ! -e ./.outputs/publish/bin ; then - mkdir -- ./.outputs/publish/bin + if test ! -e ./.outputs/publish/binaries ; then + mkdir -- ./.outputs/publish/binaries fi cp -T -- \ ./.outputs/binaries/release/kawipiko-server \ @@ -130,15 +130,14 @@ !! -<< go / build / archiver / release / publish +<< go / build / archiver / publish test "${#}" -eq 0 - printf -- '[ii] building...\n' >&2 "${ZRUN[@]}" ':: go / build / archiver / release' if test ! -e ./.outputs/publish ; then mkdir -- ./.outputs/publish fi - if test ! -e ./.outputs/publish/bin ; then - mkdir -- ./.outputs/publish/bin + if test ! -e ./.outputs/publish/binaries ; then + mkdir -- ./.outputs/publish/binaries fi cp -T -- \ ./.outputs/binaries/release/kawipiko-archiver \ @@ -159,10 +158,15 @@ "${ZRUN[@]}" ':: go / build / server / release' "${@}" !! +<< go / build / publish + "${ZRUN[@]}" ':: go / build / archiver / publish' "${@}" + "${ZRUN[@]}" ':: go / build / server / publish' "${@}" +!! -<< publish + +<< workspace / publish test "${#}" -eq 0 printf -- '[ii] publishing to `https://data.volution.ro/ciprian/ad5264afc6e27e46b5d71837552cb3fd`...\n' >&2 exec -- rsync -a -v -- ./.outputs/publish/ ./.publish/ @@ -348,7 +352,7 @@ _archive='' fi if test -z "${_archive}" ; then - _archive=./.archives/hello-world.cdb + _archive=./examples/hello-world.cdb fi "${ZRUN[@]}" ':: go / build / server / release' exec -- \ @@ -505,3 +509,26 @@ # !! + + + +<< examples / hello-world / archive + exec -- "${ZRUN[@]}" ':: execute / archiver / debug' \ + --sources ./examples/hello-world \ + --archive ./examples/hello-world.cdb \ + --debug \ + # +!! + +<< examples / hello-world / serve + exec -- "${ZRUN[@]}" ':: execute / server / debug' \ + --bind 127.153.215.30:8080 \ + --archive ./examples/hello-world.cdb \ + --archive-inmem \ + --index-all \ + --processes 1 \ + --threads 1 \ + --debug \ + # +!! +