Copy weekly changes into macos script

This commit is contained in:
Benjamin Sago 2017-10-08 20:54:18 +01:00
parent 2e2598c9a0
commit 1ebb2e95ff
1 changed files with 11 additions and 1 deletions

View File

@ -32,6 +32,13 @@ eval exa_$(grep version $toml_file | head -n 1 | sed "s/ //g")
if [ -z "$exa_version" ]; then
echo "Failed to parse version number! Can't build exa!"
exit 1
fi
# Weekly builds have a bit more information in their version number (see build.rs).
if [[ "$1" == "--weekly" ]]; then
git_hash=`GIT_DIR=$exa_root/.git git rev-parse --short --verify HEAD`
date=`date +"%Y-%m-%d"`
echo "Building exa weekly v$exa_version, date $date, Git hash $git_hash"
else
echo "Building exa v$exa_version"
fi
@ -58,7 +65,10 @@ echo "strip $exa_macos_binary"
# the binaries can have consistent names, and its still possible to tell
# different *downloads* apart.
echo -e "\n\033[4mZipping binary...\033[0m"
exa_macos_zip="$exa_root/exa-macos-x86_64-${exa_version}.zip"
if [[ "$1" == "--weekly" ]]
then exa_macos_zip="$exa_root/exa-macos-x86_64-${exa_version}-${date}-${git_hash}.zip"
else exa_macos_zip="$exa_root/exa-macos-x86_64-${exa_version}.zip"
fi
rm -vf "$exa_macos_zip" | sed 's/^/removing /'
zip -j "$exa_macos_zip" "$exa_macos_binary"