Skip to content

Commit

Permalink
Merge branch 'main' of github.com:pkiraly/qa-catalogue
Browse files Browse the repository at this point in the history
  • Loading branch information
pkiraly committed Aug 15, 2023
2 parents d879f5b + 5280256 commit 189e709
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions scripts/timeline/timeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,32 @@ while true; do
shift
done

echo "$0 name: ${NAME}, frequency: ${FREQUENCY}, start: ${START}, end: ${END}"

HISTORICAL=${BASE_OUTPUT_DIR}/_historical/${NAME}
mkdir -p $HISTORICAL

IS_INCREMENTAL=0
if [[ -e ${HISTORICAL}/history.sqlite ]]; then
IS_INCREMENTAL=1
fi
echo $HISTORICAL
echo $IS_INCREMENTAL
echo "historical: ${HISTORICAL}"
echo "is incremental: ${IS_INCREMENTAL}"
if [[ $IS_INCREMENTAL = 0 ]]; then
echo "IS NOT INCREMENTAL"
else
echo "IS INCREMENTAL"
fi

echo "deleting old CSV files"
CSVS="count.csv issue-total.csv issue-by-category.csv issue-by-type.csv"
for CSV_FILE in $CSVS; do
if [[ -e ${HISTORICAL}/${CSV_FILE} ]]; then
rm ${HISTORICAL}/${CSV_FILE}
fi
done

echo "initialize CSV files with header"
if [[ $IS_INCREMENTAL = 0 ]]; then
echo "version,total,processed" > ${HISTORICAL}/count.csv
echo "version,type,instances,records" > ${HISTORICAL}/issue-total.csv
Expand All @@ -61,6 +65,7 @@ else
FILES=$(ls -lt ${HISTORICAL} | grep "^l" | awk '{print $9}' | head -1)
fi

echo "files: "
echo $FILES

for DIR in $FILES; do
Expand Down

0 comments on commit 189e709

Please sign in to comment.