Skip to content

Commit

Permalink
test partial files
Browse files Browse the repository at this point in the history
  • Loading branch information
iakat committed Jul 1, 2024
1 parent c87f97a commit 850085c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions manifests/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,21 @@ for POD in $PODS; do
# Delete the original tar
rm "$TARNAME"
fi
SHOULD_SKIP=0
# check if these split files exist in the release, if they do, skip
for FILE in $(ls "$TMPTAR"); do
FILE_URL="https://github.com/adsblol/globe_history_$CURRENT_YEAR/releases/download/$RELEASE_NAME/$FILE"
if curl -s --head $FILE_URL | head -n 1 | grep "HTTP/[123][.1]* [23].." > /dev/null; then
echo "[ info] $FILE_URL has already been backed up. Skipping."
SHOULD_SKIP=$((SHOULD_SKIP+1))
fi
done
# if SHOULD_SKIP is the same as the n of files, skip
if [ $SHOULD_SKIP -eq $(ls "$TMPTAR" | wc -l) ]; then
echo "[ info] All files have already been backed up. Skipping."
rm -rf "$TMPTAR" "$TMP_FOLDER"
continue
fi
# 5.5. Upload the tar to GitHub releases
README=$(echo '```' && cat "$TMP_FOLDER/README.txt" && echo '```')
github-release adsblol/globe_history_$CURRENT_YEAR "$RELEASE_NAME" main "$README" "$TMPTAR/*"
Expand Down

0 comments on commit 850085c

Please sign in to comment.