mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-23 22:11:09 +03:00
e41984d0a5
ref https://linear.app/tryghost/issue/ANAL-27/setup-tinybird-project-and-cicd - Tinybird has a system for managing it's configuration as code, with full ci/cd support - The tinybird CLI tool uses python, so we'll run that using docker, via `yarn tb` - Some of the files tinybird adds should not be in source control, so we've added those to git ignore - Everything in /ghost/tinybird is tinybird's init config
22 lines
523 B
Bash
Executable File
22 lines
523 B
Bash
Executable File
|
|
#!/usr/bin/env bash
|
|
set -euxo pipefail
|
|
|
|
directory="datasources/fixtures"
|
|
extensions=("csv" "ndjson")
|
|
|
|
absolute_directory=$(realpath "$directory")
|
|
|
|
for extension in "${extensions[@]}"; do
|
|
file_list=$(find "$absolute_directory" -type f -name "*.$extension")
|
|
|
|
for file_path in $file_list; do
|
|
file_name=$(basename "$file_path")
|
|
file_name_without_extension="${file_name%.*}"
|
|
|
|
command="tb datasource append $file_name_without_extension datasources/fixtures/$file_name"
|
|
echo $command
|
|
$command
|
|
done
|
|
done
|