From 5377c8c2cc8144beeb137a1ffa6ed2d4dddcf1a6 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Fri, 13 Nov 2020 06:08:58 -0300 Subject: Nix and Bash TIL: Fix LOGS_PREFIX -> LOGS_DIR --- ...2-diy-bare-bones-ci-server-with-bash-and-nix.md | 2 +- ...2-diy-bare-bones-ci-server-with-bash-and-nix.po | 69 ++++++++++++++-------- ...2-diy-bare-bones-ci-server-with-bash-and-nix.po | 69 ++++++++++++++-------- ...2-diy-bare-bones-ci-server-with-bash-and-nix.po | 69 ++++++++++++++-------- 4 files changed, 139 insertions(+), 70 deletions(-) diff --git a/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.md b/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.md index b26a06e..d198845 100644 --- a/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.md +++ b/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.md @@ -24,7 +24,7 @@ In most of my project I like to keep a `test` attribute which runs the test with set -Eeuo pipefail set -x -LOGS_PREFIX="/data/static/ci-logs/libedn" +LOGS_DIR="/data/static/ci-logs/libedn" mkdir -p "$LOGS_DIR" LOGFILE="${LOGS_DIR}/$(date -Is)-$(git rev-parse master).log" exec &> >(tee -a "${LOGFILE}") diff --git a/locale/eo/LC_MESSAGES/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.po b/locale/eo/LC_MESSAGES/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.po index cbc72d1..9734c9f 100644 --- a/locale/eo/LC_MESSAGES/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.po +++ b/locale/eo/LC_MESSAGES/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.po @@ -28,29 +28,6 @@ msgid "" "with `nix-build -A test`. This way, a post-receive hook could look like:" msgstr "" -msgid "" -"#!/usr/bin/env bash\n" -"set -Eeuo pipefail\n" -"set -x\n" -"\n" -"LOGS_PREFIX=\"/data/static/ci-logs/libedn\"\n" -"mkdir -p \"$LOGS_DIR\"\n" -"LOGFILE=\"${LOGS_DIR}/$(date -Is)-$(git rev-parse master).log\"\n" -"exec &> >(tee -a \"${LOGFILE}\")\n" -"\n" -"unset GIT_DIR\n" -"CLONE=\"$(mktemp -d)\"\n" -"git clone . \"$CLONE\"\n" -"pushd \"$CLONE\"\n" -"\n" -"finish() {\n" -" printf \"\\n\\n>>> exit status was %s\\n\" \"$?\"\n" -"}\n" -"trap finish EXIT\n" -"\n" -"nix-build -A test\n" -msgstr "" - msgid "" "We initially (lines #5 to #8) create a log file, named after *when* the run " "is running and for *which* commit it is running for. The `exec` and `tee` " @@ -89,3 +66,49 @@ msgid "" "memory. So if it has to download too many things, or the build closure gets " "too big, the server might very well run out of memory." msgstr "" + +msgid "" +"#!/usr/bin/env bash\n" +"set -Eeuo pipefail\n" +"set -x\n" +"\n" +"LOGS_DIR=\"/data/static/ci-logs/libedn\"\n" +"mkdir -p \"$LOGS_DIR\"\n" +"LOGFILE=\"${LOGS_DIR}/$(date -Is)-$(git rev-parse master).log\"\n" +"exec &> >(tee -a \"${LOGFILE}\")\n" +"\n" +"unset GIT_DIR\n" +"CLONE=\"$(mktemp -d)\"\n" +"git clone . \"$CLONE\"\n" +"pushd \"$CLONE\"\n" +"\n" +"finish() {\n" +" printf \"\\n\\n>>> exit status was %s\\n\" \"$?\"\n" +"}\n" +"trap finish EXIT\n" +"\n" +"nix-build -A test\n" +msgstr "" + +#~ msgid "" +#~ "#!/usr/bin/env bash\n" +#~ "set -Eeuo pipefail\n" +#~ "set -x\n" +#~ "\n" +#~ "LOGS_PREFIX=\"/data/static/ci-logs/libedn\"\n" +#~ "mkdir -p \"$LOGS_DIR\"\n" +#~ "LOGFILE=\"${LOGS_DIR}/$(date -Is)-$(git rev-parse master).log\"\n" +#~ "exec &> >(tee -a \"${LOGFILE}\")\n" +#~ "\n" +#~ "unset GIT_DIR\n" +#~ "CLONE=\"$(mktemp -d)\"\n" +#~ "git clone . \"$CLONE\"\n" +#~ "pushd \"$CLONE\"\n" +#~ "\n" +#~ "finish() {\n" +#~ " printf \"\\n\\n>>> exit status was %s\\n\" \"$?\"\n" +#~ "}\n" +#~ "trap finish EXIT\n" +#~ "\n" +#~ "nix-build -A test\n" +#~ msgstr "" diff --git a/locale/fr/LC_MESSAGES/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.po b/locale/fr/LC_MESSAGES/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.po index cbc72d1..9734c9f 100644 --- a/locale/fr/LC_MESSAGES/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.po +++ b/locale/fr/LC_MESSAGES/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.po @@ -28,29 +28,6 @@ msgid "" "with `nix-build -A test`. This way, a post-receive hook could look like:" msgstr "" -msgid "" -"#!/usr/bin/env bash\n" -"set -Eeuo pipefail\n" -"set -x\n" -"\n" -"LOGS_PREFIX=\"/data/static/ci-logs/libedn\"\n" -"mkdir -p \"$LOGS_DIR\"\n" -"LOGFILE=\"${LOGS_DIR}/$(date -Is)-$(git rev-parse master).log\"\n" -"exec &> >(tee -a \"${LOGFILE}\")\n" -"\n" -"unset GIT_DIR\n" -"CLONE=\"$(mktemp -d)\"\n" -"git clone . \"$CLONE\"\n" -"pushd \"$CLONE\"\n" -"\n" -"finish() {\n" -" printf \"\\n\\n>>> exit status was %s\\n\" \"$?\"\n" -"}\n" -"trap finish EXIT\n" -"\n" -"nix-build -A test\n" -msgstr "" - msgid "" "We initially (lines #5 to #8) create a log file, named after *when* the run " "is running and for *which* commit it is running for. The `exec` and `tee` " @@ -89,3 +66,49 @@ msgid "" "memory. So if it has to download too many things, or the build closure gets " "too big, the server might very well run out of memory." msgstr "" + +msgid "" +"#!/usr/bin/env bash\n" +"set -Eeuo pipefail\n" +"set -x\n" +"\n" +"LOGS_DIR=\"/data/static/ci-logs/libedn\"\n" +"mkdir -p \"$LOGS_DIR\"\n" +"LOGFILE=\"${LOGS_DIR}/$(date -Is)-$(git rev-parse master).log\"\n" +"exec &> >(tee -a \"${LOGFILE}\")\n" +"\n" +"unset GIT_DIR\n" +"CLONE=\"$(mktemp -d)\"\n" +"git clone . \"$CLONE\"\n" +"pushd \"$CLONE\"\n" +"\n" +"finish() {\n" +" printf \"\\n\\n>>> exit status was %s\\n\" \"$?\"\n" +"}\n" +"trap finish EXIT\n" +"\n" +"nix-build -A test\n" +msgstr "" + +#~ msgid "" +#~ "#!/usr/bin/env bash\n" +#~ "set -Eeuo pipefail\n" +#~ "set -x\n" +#~ "\n" +#~ "LOGS_PREFIX=\"/data/static/ci-logs/libedn\"\n" +#~ "mkdir -p \"$LOGS_DIR\"\n" +#~ "LOGFILE=\"${LOGS_DIR}/$(date -Is)-$(git rev-parse master).log\"\n" +#~ "exec &> >(tee -a \"${LOGFILE}\")\n" +#~ "\n" +#~ "unset GIT_DIR\n" +#~ "CLONE=\"$(mktemp -d)\"\n" +#~ "git clone . \"$CLONE\"\n" +#~ "pushd \"$CLONE\"\n" +#~ "\n" +#~ "finish() {\n" +#~ " printf \"\\n\\n>>> exit status was %s\\n\" \"$?\"\n" +#~ "}\n" +#~ "trap finish EXIT\n" +#~ "\n" +#~ "nix-build -A test\n" +#~ msgstr "" diff --git a/locale/pt/LC_MESSAGES/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.po b/locale/pt/LC_MESSAGES/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.po index cbc72d1..9734c9f 100644 --- a/locale/pt/LC_MESSAGES/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.po +++ b/locale/pt/LC_MESSAGES/_tils/2020-11-12-diy-bare-bones-ci-server-with-bash-and-nix.po @@ -28,29 +28,6 @@ msgid "" "with `nix-build -A test`. This way, a post-receive hook could look like:" msgstr "" -msgid "" -"#!/usr/bin/env bash\n" -"set -Eeuo pipefail\n" -"set -x\n" -"\n" -"LOGS_PREFIX=\"/data/static/ci-logs/libedn\"\n" -"mkdir -p \"$LOGS_DIR\"\n" -"LOGFILE=\"${LOGS_DIR}/$(date -Is)-$(git rev-parse master).log\"\n" -"exec &> >(tee -a \"${LOGFILE}\")\n" -"\n" -"unset GIT_DIR\n" -"CLONE=\"$(mktemp -d)\"\n" -"git clone . \"$CLONE\"\n" -"pushd \"$CLONE\"\n" -"\n" -"finish() {\n" -" printf \"\\n\\n>>> exit status was %s\\n\" \"$?\"\n" -"}\n" -"trap finish EXIT\n" -"\n" -"nix-build -A test\n" -msgstr "" - msgid "" "We initially (lines #5 to #8) create a log file, named after *when* the run " "is running and for *which* commit it is running for. The `exec` and `tee` " @@ -89,3 +66,49 @@ msgid "" "memory. So if it has to download too many things, or the build closure gets " "too big, the server might very well run out of memory." msgstr "" + +msgid "" +"#!/usr/bin/env bash\n" +"set -Eeuo pipefail\n" +"set -x\n" +"\n" +"LOGS_DIR=\"/data/static/ci-logs/libedn\"\n" +"mkdir -p \"$LOGS_DIR\"\n" +"LOGFILE=\"${LOGS_DIR}/$(date -Is)-$(git rev-parse master).log\"\n" +"exec &> >(tee -a \"${LOGFILE}\")\n" +"\n" +"unset GIT_DIR\n" +"CLONE=\"$(mktemp -d)\"\n" +"git clone . \"$CLONE\"\n" +"pushd \"$CLONE\"\n" +"\n" +"finish() {\n" +" printf \"\\n\\n>>> exit status was %s\\n\" \"$?\"\n" +"}\n" +"trap finish EXIT\n" +"\n" +"nix-build -A test\n" +msgstr "" + +#~ msgid "" +#~ "#!/usr/bin/env bash\n" +#~ "set -Eeuo pipefail\n" +#~ "set -x\n" +#~ "\n" +#~ "LOGS_PREFIX=\"/data/static/ci-logs/libedn\"\n" +#~ "mkdir -p \"$LOGS_DIR\"\n" +#~ "LOGFILE=\"${LOGS_DIR}/$(date -Is)-$(git rev-parse master).log\"\n" +#~ "exec &> >(tee -a \"${LOGFILE}\")\n" +#~ "\n" +#~ "unset GIT_DIR\n" +#~ "CLONE=\"$(mktemp -d)\"\n" +#~ "git clone . \"$CLONE\"\n" +#~ "pushd \"$CLONE\"\n" +#~ "\n" +#~ "finish() {\n" +#~ " printf \"\\n\\n>>> exit status was %s\\n\" \"$?\"\n" +#~ "}\n" +#~ "trap finish EXIT\n" +#~ "\n" +#~ "nix-build -A test\n" +#~ msgstr "" -- cgit v1.2.3