feat(tools,build): dynamically list files to build
This commit is contained in:
+8
-25
@@ -16,34 +16,17 @@ fi
|
|||||||
|
|
||||||
rm -f "$OUTPUT"
|
rm -f "$OUTPUT"
|
||||||
|
|
||||||
BUILD_ORDER=(
|
BUILD_FILES=("header.sql")
|
||||||
"header.sql"
|
|
||||||
"types.sql"
|
while IFS= read -r file; do
|
||||||
"config.sql"
|
BUILD_FILES+=("$file")
|
||||||
"organizations.sql"
|
done < <(find "$SRC_DIR" -maxdepth 1 -name "*.sql" -type f ! -name "header.sql" ! -name "footer.sql" -exec basename {} \; | sort)
|
||||||
"roles.sql"
|
|
||||||
"activities.sql"
|
BUILD_FILES+=("footer.sql")
|
||||||
"views.sql"
|
|
||||||
"contexts.sql"
|
|
||||||
"rules.sql"
|
|
||||||
"cross_org_rules.sql"
|
|
||||||
"admin_rules.sql"
|
|
||||||
"audit.sql"
|
|
||||||
"hierarchy_functions.sql"
|
|
||||||
"materialized_views.sql"
|
|
||||||
"validation.sql"
|
|
||||||
"auth_cache.sql"
|
|
||||||
"authorization.sql"
|
|
||||||
"policy_dsl.sql"
|
|
||||||
"rls.sql"
|
|
||||||
"obligations.sql"
|
|
||||||
"admin_helpers.sql"
|
|
||||||
"footer.sql"
|
|
||||||
)
|
|
||||||
|
|
||||||
file_count=0
|
file_count=0
|
||||||
|
|
||||||
for filename in "${BUILD_ORDER[@]}"; do
|
for filename in "${BUILD_FILES[@]}"; do
|
||||||
filepath="$SRC_DIR/$filename"
|
filepath="$SRC_DIR/$filename"
|
||||||
if [ -f "$filepath" ]; then
|
if [ -f "$filepath" ]; then
|
||||||
cat "$filepath" >> "$OUTPUT"
|
cat "$filepath" >> "$OUTPUT"
|
||||||
|
|||||||
Reference in New Issue
Block a user