Skip to content

Commit

Permalink
missing quote marks
Browse files Browse the repository at this point in the history
  • Loading branch information
jmillanacosta authored Jan 26, 2024
1 parent 4e6ca46 commit f34b82a
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions .github/workflows/chebi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,22 @@ jobs:
string=$(tail -4 index.html | head -1)
##Extract the date from the latest release (up to the day)
date_new=$(echo "$string" | grep -oP '<td align="right">\K[0-9-]+\s[0-9:]+(?=\s+</td>)' | awk '{print $1}')
echo $date_new
release=$(echo "$string" | grep -oP '(?<=a href="rel)\d\d\d')
echo "RELEASE=$release" >>$GITHUB_ENV
##Extract the date from the ChEBI README file (up to the day)
##Extract the date from the ChEBI README file
date_old=$date
echo $date_old
##Print the dates
##Compare the dates and set GITHUB_ENV variable if date_new is more recent
timestamp1=$(date -d "$date_new" +%s)
timestamp2=$(date -d "$date_old" +%s)
echo $timestamp1
echo $timestamp2
if [ "$timestamp1" -gt "$timestamp2" ]; then
echo "DOWNLOAD_FILE=true" >> $GITHUB_ENV
echo 'New release (rel${release}) available'
else
echo "DOWNLOAD_FILE=false" >> $GITHUB_ENV
echo 'No new release available'
fi
echo "Date of latest release: $date_new", "Date of release of the current version: $date_old", "Download: ${{ github.DOWNLOAD_FILE }}
echo "Date of latest release: $date_new", "Date of release of the current version: $date_old", "Download: ${{ github.DOWNLOAD_FILE }}"
##Clean up
rm index.htm*
Expand Down

0 comments on commit f34b82a

Please sign in to comment.