From d639219b940b0eb665f89b617bb07713e57e7a11 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Wed, 15 Dec 2021 10:13:06 +0100 Subject: [PATCH] feat(general): Force rebuild of status go at least once a day fixes #4297 --- Makefile | 5 ++++- scripts/force-rebuild-status-go.sh | 7 +++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 scripts/force-rebuild-status-go.sh diff --git a/Makefile b/Makefile index 4748b2ad79..c16c7bb05f 100644 --- a/Makefile +++ b/Makefile @@ -327,7 +327,7 @@ $(NIM_STATUS_CLIENT): $(NIM_SOURCES) | $(DOTHERSIDE) $(STATUSGO) $(KEYCARDGO) $( @rpath/libkeycard.dylib \ bin/nim_status_client) || true) -nim_status_client: $(NIM_STATUS_CLIENT) +nim_status_client: force-rebuild-status-go $(NIM_STATUS_CLIENT) _APPIMAGE_TOOL := appimagetool-x86_64.AppImage APPIMAGE_TOOL := tmp/linux/tools/$(_APPIMAGE_TOOL) @@ -535,6 +535,9 @@ clean: | clean-common rm -rf bin/* node_modules bottles/* pkg/* tmp/* $(STATUSGO) $(KEYCARDGO) + $(MAKE) -C vendor/DOtherSide/build --no-print-directory clean +force-rebuild-status-go: + bash ./scripts/force-rebuild-status-go.sh $(STATUSGO) + run: $(RUN_TARGET) ICON_TOOL := node_modules/.bin/fileicon diff --git a/scripts/force-rebuild-status-go.sh b/scripts/force-rebuild-status-go.sh new file mode 100644 index 0000000000..d0774115ab --- /dev/null +++ b/scripts/force-rebuild-status-go.sh @@ -0,0 +1,7 @@ +#!/usr/bin/env bash +set -eof pipefail + +if test `find $1 -mmin +1440`; then + echo "forcing rebuild of status go" + rm $1 +fi