summaryrefslogtreecommitdiffstats
path: root/security/nss/automation/taskcluster/graph/src/context_hash.js
diff options
context:
space:
mode:
Diffstat (limited to 'security/nss/automation/taskcluster/graph/src/context_hash.js')
-rw-r--r--security/nss/automation/taskcluster/graph/src/context_hash.js16
1 files changed, 3 insertions, 13 deletions
diff --git a/security/nss/automation/taskcluster/graph/src/context_hash.js b/security/nss/automation/taskcluster/graph/src/context_hash.js
index 0699a0590..f0a2e9a88 100644
--- a/security/nss/automation/taskcluster/graph/src/context_hash.js
+++ b/security/nss/automation/taskcluster/graph/src/context_hash.js
@@ -27,24 +27,14 @@ function collectFilesInDirectory(dir) {
});
}
-// A list of hashes for each file in the given path.
-function collectFileHashes(context_path) {
+// Compute a context hash for the given context path.
+export default function (context_path) {
let root = path.join(__dirname, "../../../..");
let dir = path.join(root, context_path);
let files = collectFilesInDirectory(dir).sort();
-
- return files.map(file => {
+ let hashes = files.map(file => {
return sha256(file + "|" + fs.readFileSync(file, "utf-8"));
});
-}
-
-// Compute a context hash for the given context path.
-export default function (context_path) {
- // Regenerate all images when the image_builder changes.
- let hashes = collectFileHashes("automation/taskcluster/image_builder");
-
- // Regenerate images when the image itself changes.
- hashes = hashes.concat(collectFileHashes(context_path));
// Generate a new prefix every month to ensure the image stays buildable.
let now = new Date();