Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8dev
v10dev
4 changes: 3 additions & 1 deletion queries/cdmq/add-run-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ module.exports = async ({ instance, filePath, docTypes, mode }) => {
// "run":{"run-uuid":"c0e04edb-ddbc-4081-8bbc-9b9e84e6538d"}}
if (Object.keys(action).includes('index') && Object.keys(action['index']).includes('_index')) {
const indexName = action['index']['_index'];
const regExp = /^cdm-*(v7dev|v8dev|v9dev)-([^@]+)(@\d\d\d\d\.\d\d)*$/;
const regExp = new RegExp(
'^cdm-*(' + cdm.supportedCdmVersions.join('|') + ')-([^@]+)(@\\d\\d\\d\\d\\.\\d\\d)*$'
);
const matches = regExp.exec(indexName);
if (matches) {
const cdmVer = matches[1];
Expand Down
6 changes: 3 additions & 3 deletions queries/cdmq/add-run.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ function save_ver(ver) {
console.log('You must specify a --host before a --ver');
process.exit(1);
}
if (/^v[789]dev$/.exec(ver)) {
if (cdm.isValidCdmVersion(ver)) {
instances[instances.length - 1]['ver'] = ver;
} else {
console.log('The version must be v7dev, v8dev, or v9dev, not: ' + ver);
console.log('The version must be one of: ' + cdm.supportedCdmVersions.join(', ') + ', not: ' + ver);
process.exit(1);
}
}
Expand Down Expand Up @@ -119,7 +119,7 @@ async function main() {
.option('--dir <a directory with ndjson files to index>')
.option('--host <host[:port]>', 'The host and optional port of the OpenSearch instance', save_host)
.option('--userpass <user:pass>', 'The user and password for the most recent --host', save_userpass)
.option('--ver <v7dev|v8dev|v9dev>', 'The Common Data Model version to use for the most recent --host', save_ver)
.option(cdm.cdmVersionOptionDesc(), 'The Common Data Model version to use for the most recent --host', save_ver)
.parse(process.argv);

// If the user does not specify any hosts, assume localhost:9200 is used
Expand Down
Loading
Loading