bulltrackers-module 1.0.245 → 1.0.246
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -10,9 +10,13 @@ const { normalizeName, getExpectedDateStrings, DEFINITIVE_EARLIEST_DATES } = req
|
|
|
10
10
|
const { checkRootDataAvailability } = require('../data/AvailabilityChecker');
|
|
11
11
|
const { FieldValue } = require('@google-cloud/firestore');
|
|
12
12
|
const pLimit = require('p-limit');
|
|
13
|
+
const path = require('path');
|
|
14
|
+
|
|
13
15
|
|
|
14
16
|
// Attempt to load package.json to get version. Path depends on where this is invoked.
|
|
15
|
-
|
|
17
|
+
const packageJson = require(path.join(__dirname, '..', '..', 'package.json'));
|
|
18
|
+
|
|
19
|
+
const packageVersion = packageJson.version;
|
|
16
20
|
|
|
17
21
|
|
|
18
22
|
/**
|
|
@@ -22,7 +26,8 @@ let packageVersion = '1.0.301'; // Bumped version to reflect logic change
|
|
|
22
26
|
*/
|
|
23
27
|
async function ensureBuildReport(config, dependencies, manifest) {
|
|
24
28
|
const { db, logger } = dependencies;
|
|
25
|
-
const
|
|
29
|
+
const now = new Date();
|
|
30
|
+
const buildId = `v${packageVersion}_${now.getFullYear()}-${String(now.getMonth()+1).padStart(2,'0')}-${String(now.getDate()).padStart(2,'0')}_${String(now.getHours()).padStart(2,'0')}-${String(now.getMinutes()).padStart(2,'0')}-${String(now.getSeconds()).padStart(2,'0')}`;
|
|
26
31
|
const reportRef = db.collection('computation_build_records').doc(buildId);
|
|
27
32
|
|
|
28
33
|
try {
|