From 489d16076a4be6c039b789c97f319620151d6ded Mon Sep 17 00:00:00 2001 From: Marcus Date: Wed, 11 Nov 2020 21:02:58 -0500 Subject: [PATCH] this should crash me locally --- relay/service.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/relay/service.js b/relay/service.js index 01a2296..a515883 100644 --- a/relay/service.js +++ b/relay/service.js @@ -1,15 +1,24 @@ (() => { - +const log = require('signale'); const { execSync } = require('child_process'); const branch = 'master'; -const remoteHash = execSync('git ls-remote https://') - +function update() { + const remoteHash = execSync('git ls-remote https://github.com/marcus13345/valnet.git').toString().split(/[\t\n]/g)[0].trim(); + const localHash = execSync(`git rev-parse ${branch}`).toString().trim(); + if(remoteHash !== localHash) { + log.info('remote hash:', remoteHash); + log.info('local hash: ', localHash); + process.exit(2); + } +} +require('./index.js'); +setInterval(update, 5000);