Skip to content

Commit 2da5ee5

Browse files
authored
chore(bq): allow supporting multiple libraries in one line (#543)
1 parent a77c453 commit 2da5ee5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clouds/bigquery/common/build_modules.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ if (argv.production) {
159159
let content = output.map(f => f.content).join(separator);
160160

161161
function apply_replacements (text) {
162-
const libraries = [... new Set(text.match(new RegExp('@@BQ_LIBRARY_.*_BUCKET@@', 'g')))];
162+
const libraries = [... new Set(content.match(new RegExp('@@BQ_LIBRARY_[^@]*?_BUCKET@@', 'g')))];
163163
for (let library of libraries) {
164164
let libraryName = library.replace('@@BQ_LIBRARY_', '').replace('_BUCKET@@', '').toLowerCase();
165165
if (makelib == libraryName) {

clouds/bigquery/common/list_libraries.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function add (f, include) {
134134
functions.forEach(f => add(f));
135135

136136
const content = output.map(f => f.content).join('\n');
137-
let libraries = [... new Set(content.match(new RegExp('@@BQ_LIBRARY_.*_BUCKET@@', 'g')))]
137+
let libraries = [... new Set(content.match(new RegExp('@@BQ_LIBRARY_[^@]*?_BUCKET@@', 'g')))]
138138
.map(l => l.replace('@@BQ_LIBRARY_', '').replace('_BUCKET@@', '').toLowerCase());
139139

140140
// Exclude libraries pointed by makelib as they are deployed separately

0 commit comments

Comments
 (0)