Skip to content
Permalink
Browse files

Shorten solution with vr8hub's suggestion

  • Loading branch information
canihavesomecoffee committed Feb 16, 2020
1 parent 1577a45 commit dc2ef84100a7e69a898a81a933910c81c55a2002
Showing with 1 addition and 4 deletions.
  1. +1 −4 mac/pre-build.sh
@@ -21,10 +21,7 @@ fi
if [ -z "$commit" ]; then
commit="Unknown"
fi
date_format="+%Y-%m-%d"
date_epoch="${SOURCE_DATE_EPOCH:-$(date +%s)}"
builddate=$(date -u -d "@$date_epoch" "$date_format" 2>/dev/null || date -u -r "$date_epoch" "$date_format" 2>/dev/null || date -u "$date_format")
#builddate=`date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d`
builddate=`date -j -u -r "${SOURCE_DATE_EPOCH:-$(date +%s)}" +%Y-%m-%d`
echo "Storing variables in file"
echo "Commit: $commit"
echo "Date: $builddate"

0 comments on commit dc2ef84

Please sign in to comment.
You can’t perform that action at this time.