Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/22 update node commands which have corresponding bash commands and delete bash command #25

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,7 @@ Checks the downloaded migration log files to see which ones completed successful
#### Usage

```
./check_migrations.sh [-d [directory]] [-l [log_file]]
npx check-migrations [-d [directory]] [-l [log_file]]
```

#### Arguments
Expand All @@ -1229,7 +1229,7 @@ Examines a directory containing all the log files after starting migrations with
#### Usage

```
./find_log_errors.sh [-d [directory]] [-l [log_file]]
npx find-log-errors [-d [directory]] [-l [log_file]]
```

#### Arguments
Expand Down
1 change: 1 addition & 0 deletions check_migrations.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
import fs from 'fs';
import path from 'path';

Expand Down
95 changes: 0 additions & 95 deletions check_migrations.sh

This file was deleted.

13 changes: 8 additions & 5 deletions find_log_errors.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env node
import fs from 'fs';
import path from 'path';

Expand Down Expand Up @@ -77,10 +78,12 @@ logFiles.forEach(logFile => {
const errorMatch = verboseLogFileContent.match(/\[ERROR\] (.*)/);
const error = errorMatch ? errorMatch[1] : '';

const sourceOrg = logFileContent.match(/GITHUB SOURCE ORG: ([^\s]*)/)?.[1] || '';
const sourceRepo = logFileContent.match(/SOURCE REPO: ([^\s]*)/)?.[1] || '';
const destinationOrg = logFileContent.match(/GITHUB TARGET ORG: ([^\s]*)/)?.[1] || '';
const destinationRepo = logFileContent.match(/TARGET REPO: ([^\s]*)/)?.[1] || '';
if (error) {
const sourceOrg = logFileContent.match(/GITHUB SOURCE ORG: ([^\s]*)/)?.[1] || '';
const sourceRepo = logFileContent.match(/SOURCE REPO: ([^\s]*)/)?.[1] || '';
const destinationOrg = logFileContent.match(/GITHUB TARGET ORG: ([^\s]*)/)?.[1] || '';
const destinationRepo = logFileContent.match(/TARGET REPO: ([^\s]*)/)?.[1] || '';

log(`${sourceOrg},${sourceRepo},${destinationOrg},${destinationRepo},"${error}"`);
log(`${sourceOrg},${sourceRepo},${destinationOrg},${destinationRepo},"${error}"`);
}
});
82 changes: 0 additions & 82 deletions find_log_errors.sh

This file was deleted.

5 changes: 2 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
},
"bin": {
"git-migrator": "src/index.js",
"check-migrations": "./check_migrations.sh",
"compare-migrations": "./compare_migrations.sh",
"find-log-errors": "./find_log_errors.sh",
"migrate-secrets": "./migrate_secrets.sh",
"find-log-errors-js": "./find_log_errors.js"
"find-log-errors": "node find_log_errors.js",
"check-migrations": "node check_migrations.js"
},
"keywords": [],
"author": "ModusCreate",
Expand Down