From f70da56c7272dfe56cb888cffe65997a33e86f4b Mon Sep 17 00:00:00 2001
From: Fawzi Mohamed <fawzi.mohamed@fhi-berlin.mpg.de>
Date: Tue, 11 Sep 2018 14:57:03 +0200
Subject: [PATCH] calculate checksum for replacements

---
 app/components.js | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/app/components.js b/app/components.js
index f8a3802..54f10cd 100644
--- a/app/components.js
+++ b/app/components.js
@@ -7,6 +7,7 @@ const cconfig = config.k8component
 const userSettings = require('./userSettings')
 const crypto = require('crypto');
 const url = require('url');
+const compact_sha = require('./compact-sha')
 
 var baseRepl = {
   baseDir: baseDir,
@@ -155,6 +156,8 @@ function replacementsForUser(user, extraRepl, next) {
   repl['user'] = user
   repl['imageType'] = imageType
   repl['podName'] = podNameForRepl(repl)
+  delete repl.replacementsChecksum
+  repl.replacementsChecksum = compact_sha.objectSha(repl)
 
   next(null, repl)
 }
-- 
GitLab