diff --git a/release.sh b/release.sh index 28f6c6f..4fd2918 100755 --- a/release.sh +++ b/release.sh @@ -34,12 +34,22 @@ if [[ -z ${release_package} ]]; then error_exit 'could not find the release package' fi +if (git describe | grep -w ee); then + release_dir="$(openssl rand -hex 20)" + if [[ $? -ne 0 ]]; then + error_exit 'failed to generate release directory name' + fi + remote_package_path="s3://${RELEASE_BUCKET}/${release_dir}/${release_package}" +else + remote_package_path="s3://${RELEASE_BUCKET}/${release_package}" +fi + echo echo 'Package MD5:' md5sum ${release_package} echo echo 'Starting upload' -if !(aws s3 cp ${release_package} s3://${RELEASE_BUCKET} --acl public-read --region ${RELEASE_BUCKET_REGION}); then +if !(aws s3 cp ${release_package} ${remote_package_path} --acl public-read --region ${RELEASE_BUCKET_REGION}); then error_exit 'release upload failed' fi -- libgit2 0.21.2