Skip to content

Commit

Permalink
simpler solution to skip old files
Browse files Browse the repository at this point in the history
  • Loading branch information
jeroen committed Sep 11, 2024
1 parent 1e1c6b5 commit 477f1d5
Showing 1 changed file with 6 additions and 14 deletions.
20 changes: 6 additions & 14 deletions deploy.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
#!/bin/bash
set -e

# Temporary solution to not reupload old source packges
# TODO: actually compare $STOREDATE to date here
if [ -z "$STOREDATE" ]; then
echo "Skipping redeploy of old file"; exit 0
fi

if [ -z "$COMMITINFO" ]; then
echo "Missing COMMITINFO"; exit 1
fi
Expand Down Expand Up @@ -57,20 +63,6 @@ else
exit 1
fi

# Temporary solution to not reupload old source packges
if [ "$PKGTYPE" == "src" ]; then
tar xf "${FILE}" "${PACKAGE}/DESCRIPTION"
BUILDDATE=$(grep -oh 'Packaged: [0-9-]*' -i "${PACKAGE}/DESCRIPTION" | grep -o '[0-9-]*')
rm -f "${PACKAGE}/DESCRIPTION"
month=$(echo $BUILDDATE | cut -f2 -d-)
day=$(echo $BUILDDATE | cut -f3 -d-)
if [ "$month" -lt "9" ] || [ "$day" -lt "9" ]; then
echo "Skipping redeploy of source package from $BUILDDATE"
exit 0
fi
fi
## End of temporary solution

# Add status for binaries to source deploy
if [ "$PKGTYPE" == "src" ]; then

Expand Down

0 comments on commit 477f1d5

Please sign in to comment.