@opentermsarchive/engine 0.27.1 → 0.28.0
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.
- package/package.json +1 -1
- package/scripts/dataset/index.js +3 -1
package/package.json
CHANGED
package/scripts/dataset/index.js
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import path from 'path';
|
|
3
3
|
|
|
4
|
+
import config from 'config';
|
|
5
|
+
|
|
4
6
|
import generateRelease from './export/index.js';
|
|
5
7
|
import logger from './logger/index.js';
|
|
6
8
|
import publishRelease from './publish/index.js';
|
|
7
9
|
|
|
8
10
|
export async function release({ shouldPublish, shouldRemoveLocalCopy, fileName }) {
|
|
9
11
|
const releaseDate = new Date();
|
|
10
|
-
const archiveName = fileName || `dataset-${releaseDate.toISOString().replace(/T.*/, '')}`;
|
|
12
|
+
const archiveName = fileName || `dataset-${config.get('dataset.title')}-${releaseDate.toISOString().replace(/T.*/, '')}`;
|
|
11
13
|
const archivePath = `${path.basename(archiveName, '.zip')}.zip`; // allow to pass filename or filename.zip as the archive name and have filename.zip as the result name
|
|
12
14
|
|
|
13
15
|
logger.info('Start exporting dataset…');
|