Skip to content

Commit ac661b7

Browse files
authored
Merge pull request #75 from epilot-dev/feat/api-changelog
Only try to copy files if some exist, otherwise it casues an error
2 parents c3d218d + cd5975c commit ac661b7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/get-changelogs.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ mkdir -p "$PROCESSING_DIR"
1919
# Download only .md files from S3
2020
aws s3 sync "s3://$S3_BUCKET/$S3_PREFIX" "$LOCAL_DIR" --exclude "*" --include "*.md"
2121

22-
cp "$LOCAL_DIR"/*.md "$PROCESSING_DIR"
22+
# Only copy if there are .md files
23+
if ls "$LOCAL_DIR"/*.md 1> /dev/null 2>&1; then
24+
cp "$LOCAL_DIR"/*.md "$PROCESSING_DIR"
25+
fi
2326

2427
# Process downloaded files: update H1 header to only the last semantic version after "vs. "
2528
for file in "$PROCESSING_DIR"/*.md; do

0 commit comments

Comments
 (0)