-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_all.sh
More file actions
executable file
·41 lines (33 loc) · 1.1 KB
/
generate_all.sh
File metadata and controls
executable file
·41 lines (33 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/usr/bin/env bash
set -euo pipefail
export PYTHONPATH=.
# Define pairs
INPUT_FILES=(
"static/vectordotdev_vector_issues.json"
"static/vectordotdev_vrl_issues.json"
)
ENV_FILES=(
"vector.env"
"vrl.env"
)
DB_FILES=(
"out/db/vectordotdev_vector.db"
"out/db/vectordotdev_vrl.db"
)
# Check that arrays are same length
if [[ ${#INPUT_FILES[@]} -ne ${#ENV_FILES[@]} ]] || [[ ${#INPUT_FILES[@]} -ne ${#DB_FILES[@]} ]]; then
echo "Error: INPUT_FILES, ENV_FILES, and DB_FILES must have the same length."
exit 1
fi
# Loop over the pairs
for i in "${!INPUT_FILES[@]}"; do
input_file="${INPUT_FILES[$i]}"
env_file="${ENV_FILES[$i]}"
db_file="${DB_FILES[$i]}"
echo "Running with input: $input_file and env: $env_file"
python scripts/db/sqlite_writer.py --input "$input_file" --env-file "$env_file"
python scripts/db/generate_summary.py --db "${db_file}" --env-file "$env_file"
START_DATE=$(date -d "$(date +%Y-%m-01) -12 months" +%Y-%m)
python scripts/util/plot.py --env-file "$env_file" --start "$START_DATE" --input-dir out/summaries \
--exclude-labels "no-changelog,meta: awaiting author"
done