[scripts] Minor updates

This commit is contained in:
Ciprian Dorin Craciun 2019-08-12 14:39:41 +03:00
parent 7a07668283
commit 18c178a4a1

View file

@ -19,12 +19,12 @@
<< execute / server / debug
"${ZRUN[@]}" ':: go / build / server / debug'
exec -- env -i ./.outputs/binaries/debug/kawipiko-server "${@}"
exec -- env -i -- ./.outputs/binaries/debug/kawipiko-server "${@}"
!!
<< execute / server / release
"${ZRUN[@]}" ':: go / build / server / release'
exec -- env -i ./.outputs/binaries/release/kawipiko-server "${@}"
exec -- env -i -- ./.outputs/binaries/release/kawipiko-server "${@}"
!!
@ -32,6 +32,7 @@
test "${#}" -eq 0
_outputs="$( exec -- readlink -e -- ./.outputs )"
mkdir -p -- "${_outputs}/binaries/debug"
rm -f -- "${_outputs}/binaries/debug/kawipiko-server"
exec -- "${ZRUN[@]}" ':: go / tool' \
build \
-v \
@ -44,6 +45,7 @@
test "${#}" -eq 0
_outputs="$( exec -- readlink -e -- ./.outputs )"
mkdir -p -- "${_outputs}/binaries/release"
rm -f -- "${_outputs}/binaries/release/kawipiko-server"
exec -- "${ZRUN[@]}" ':: go / tool' \
build \
-v \
@ -58,6 +60,7 @@
<< go / build / server / analyze
test "${#}" -eq 0
_outputs="$( exec -- readlink -e -- ./.outputs )"
mkdir -p -- "${_outputs}/binaries/debug"
rm -f -- "${_outputs}/binaries/debug/kawipiko-server"
exec -- "${ZRUN[@]}" ':: go / tool' \
build \
@ -96,12 +99,12 @@
<< execute / archiver / debug
"${ZRUN[@]}" ':: go / build / archiver / debug'
exec -- env -i ./.outputs/binaries/debug/kawipiko-archiver "${@}"
exec -- env -i -- ./.outputs/binaries/debug/kawipiko-archiver "${@}"
!!
<< execute / archiver / release
"${ZRUN[@]}" ':: go / build / archiver / release'
exec -- env -i ./.outputs/binaries/release/kawipiko-archiver "${@}"
exec -- env -i -- ./.outputs/binaries/release/kawipiko-archiver "${@}"
!!
@ -109,6 +112,7 @@
test "${#}" -eq 0
_outputs="$( exec -- readlink -e -- ./.outputs )"
mkdir -p -- "${_outputs}/binaries/debug"
rm -f -- "${_outputs}/binaries/debug/kawipiko-archiver"
exec -- "${ZRUN[@]}" ':: go / tool' \
build \
-v \
@ -121,6 +125,7 @@
test "${#}" -eq 0
_outputs="$( exec -- readlink -e -- ./.outputs )"
mkdir -p -- "${_outputs}/binaries/release"
rm -f -- "${_outputs}/binaries/release/kawipiko-archiver"
exec -- "${ZRUN[@]}" ':: go / tool' \
build \
-v \
@ -330,7 +335,7 @@
<< documentation / readme / server
test "${#}" -eq 0
exec -- env -i ./.python/bin/restview --no-browser --listen 127.33.237.174:8080 --allowed-hosts '*' -- ./readme.rst
exec -- env -i -- ./.python/bin/restview --no-browser --listen 127.33.237.174:8080 --allowed-hosts '*' -- ./readme.rst
!!
@ -365,7 +370,7 @@
chrt -r 10 \
prlimit -n16384 -- \
sudo -u "${USER}" -n -E -P -- \
env -i \
env -i -- \
./.outputs/binaries/release/kawipiko-server \
--bind 127.9.185.194:8080 \
--archive "${_archive}" \
@ -451,7 +456,7 @@
chrt -r 10 \
prlimit -n16384 -- \
sudo -u "${USER}" -n -E -P -- \
env -i \
env -i -- \
"$( type -P -- wrk )" \
--threads 2 \
--connections 1 \
@ -476,7 +481,7 @@
chrt -r 10 \
prlimit -n16384 -- \
sudo -u "${USER}" -n -E -P -- \
env -i \
env -i -- \
"$( type -P -- wrk )" \
--threads 2 \
--connections 1 \
@ -503,13 +508,16 @@
else
_path=''
fi
exec -- env -i "$( type -P -- curl )" \
exec -- \
env -i -- \
"$( type -P -- curl )" \
--silent \
--compressed \
--output /dev/stdout \
--dump-header /dev/stdout \
"${@}" \
-- "http://127.9.185.194:8080/${_path}" \
-- \
"http://127.9.185.194:8080/${_path}" \
#
!!
@ -543,6 +551,7 @@
test "${#}" -eq 0
_outputs="$( exec -- readlink -e -- ./.outputs )"
mkdir -p -- "${_outputs}/binaries/release"
rm -f -- "${_outputs}/binaries/release/kawipiko-server-dummy"
"${ZRUN[@]}" ':: go / tool' \
build \
-v \
@ -552,6 +561,17 @@
-o "${_outputs}/binaries/release/kawipiko-server-dummy" \
-- ./cmd/server-dummy.go \
#
exec env -i -- "${_outputs}/binaries/release/kawipiko-server-dummy" "${@}"
exec -- \
sudo -u root -n -E -P -- \
taskset -c 0,1 \
nice -n -19 -- \
ionice -c 2 -n 0 -- \
chrt -r 10 \
prlimit -n16384 -- \
sudo -u "${USER}" -n -E -P -- \
env -i -- \
./.outputs/binaries/release/kawipiko-server-dummy \
"${@}" \
#
!!