You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
short="$(printf '%s\n'"$version_json"| grep -E '"short"[[:space:]]*:'| head -1 | sed 's/.*"short"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/')"
313
-
sha="$(printf '%s\n'"$version_json"| grep -E '"sha"[[:space:]]*:'| head -1 | sed 's/.*"sha"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/')"
314
-
branch="$(printf '%s\n'"$version_json"| grep -E '"branch"[[:space:]]*:'| head -1 | sed 's/.*"branch"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/')"
315
-
deployed_at="$(printf '%s\n'"$version_json"| grep -E '"deployed_at"[[:space:]]*:'| head -1 | sed 's/.*"deployed_at"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/')"
deployed_sha="$(sudo -u "$BAUDBOT_AGENT_USER" sh -c "grep '\"sha\"' '$version_file' 2>/dev/null | head -1 | sed 's/.*\"sha\"[[:space:]]*:[[:space:]]*\"\([^\"]*\)\".*/\1/'")"
Copy file name to clipboardExpand all lines: bin/update-release.sh
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -58,6 +58,8 @@ die() {
58
58
59
59
# shellcheck source=bin/lib/release-common.sh
60
60
source"$SCRIPT_DIR/lib/release-common.sh"
61
+
# shellcheck source=bin/lib/json-common.sh
62
+
source"$SCRIPT_DIR/lib/json-common.sh"
61
63
62
64
cleanup() {
63
65
if [ -n"$CHECKOUT_DIR" ] && [ -d"$CHECKOUT_DIR" ];then
@@ -305,7 +307,7 @@ run_restart_and_health() {
305
307
local version_file="$BAUDBOT_AGENT_HOME/.pi/agent/baudbot-version.json"
306
308
local deployed_sha
307
309
308
-
deployed_sha="$(sudo -u "$BAUDBOT_AGENT_USER" sh -c "grep '\"sha\"' '$version_file' 2>/dev/null | head -1 | sed 's/.*\"sha\"[[:space:]]*:[[:space:]]*\"\([^\"]*\)\".*/\1/'")"
0 commit comments