Skip to content

Commit

Permalink
Update db scripts and location of scripts-*.jar to core-*.jar
Browse files Browse the repository at this point in the history
Update db scripts and location of scripts-*.jar to core-*.jar
  • Loading branch information
JREastonMarks committed Nov 9, 2023
1 parent 8c59c96 commit 3698734
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/main/resources/scripts/envSimple.pl
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ sub locate_src_root {
# isolate the directory this code file is in
my ($volume, $script_dir, undef) = File::Spec->splitpath(__FILE__);
# go up from cbioportal/core/src/main/scripts/ to cbioportal/
my $src_root_dir = File::Spec->catdir($script_dir, (File::Spec->updir()) x 4);
my $src_root_dir = File::Spec->catdir($script_dir, (File::Spec->updir()) x 1);
# reassamble the path and resolve updirs (/../)
return abs_path(File::Spec->catpath($volume, $src_root_dir));
}
$src_root = locate_src_root();
@jar_files = glob("$src_root/scripts/target/scripts-*.jar");
@jar_files = glob("$src_root/scripts/target/core-*.jar");
if (scalar @jar_files != 1) {
die "Expected to find 1 scripts-*.jar, but found: " . scalar @jar_files;
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/scripts/migrate_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ def main():
script_dir = Path(__file__).resolve().parent
# go up from cbioportal/core/src/main/scripts/ to cbioportal/
src_root = script_dir.parent.parent.parent.parent
sql_filename = src_root / 'db-scripts/src/main/resources/migration.sql'
sql_filename = src_root / 'src/main/resources/db-scripts/migration.sql'

if not os.path.exists(sql_filename):
print('sql file %s cannot be found' % (sql_filename), file=ERROR_FILE)
Expand Down

0 comments on commit 3698734

Please sign in to comment.