Skip to content

Commit

Permalink
Make sure .gitkeep files do not get removed
Browse files Browse the repository at this point in the history
  • Loading branch information
elsaperelli committed Mar 21, 2024
1 parent 4e8ac1a commit f610b53
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion data-requirements/compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if [ ! -d "elm-parser-for-ecqms" ]; then
ruby parse_elm.rb --bundle qicore
cd ..
if [ -d "elm-parser-dr" ]; then
rm -rf elm-parser-dr
rm -rf elm-parser-dr/*.json
fi
mkdir elm-parser-dr
SOURCE_DIR="elm-parser-for-ecqms/data_requirements/library"
Expand Down
14 changes: 9 additions & 5 deletions data-requirements/fqm-e-dr.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import fs from 'fs';
import fs, { readdirSync } from 'fs';
import path from 'path';
import { Calculator } from '../src';

Expand All @@ -16,12 +16,16 @@ const JAN_2024_CONNECTATHON_BASE_PATH = path.join(__dirname, './jan-2024-connect
async function main() {
// if the fqm-e-dr directory already exists, remove it and its contents
if (fs.existsSync('./fqm-e-dr')) {
fs.rmSync('./fqm-e-dr', { recursive: true });
readdirSync('./fqm-e-dr').forEach(file => {
if (file.endsWith('.json')) {
fs.rmSync(`./fqm-e-dr/${file}`);
}
});
} else {
// create new fqm-e-dr directory within the data-requirements directory
fs.mkdirSync('./fqm-e-dr');
}

// create new fqm-e-dr directory within the data-requirements directory
fs.mkdirSync('./fqm-e-dr');

// get all of the file names (short and fullPath) from the jan-2024-connectathon directory
const allBundles = fs
.readdirSync(JAN_2024_CONNECTATHON_BASE_PATH)
Expand Down
2 changes: 1 addition & 1 deletion data-requirements/summary-compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if [ ! -d "elm-parser-for-ecqms" ]; then
ruby parse_elm.rb --bundle qicore
cd ..
if [ -d "elm-parser-dr" ]; then
rm -rf elm-parser-dr
rm -rf elm-parser-dr/*.json
fi
mkdir elm-parser-dr
SOURCE_DIR="elm-parser-for-ecqms/data_requirements/library"
Expand Down

0 comments on commit f610b53

Please sign in to comment.