diff --git a/create-final-public-release.sh b/create-final-public-release.sh index ccf12f1..450f5b8 100755 --- a/create-final-public-release.sh +++ b/create-final-public-release.sh @@ -8,9 +8,6 @@ set -e RELEASE="mtail" DESCRIPTION="Mtail Bosh Release" GITHUB_REPO="SpringerPE/mtail-boshrelease" -# Do not define this variable if the repo uses git lfs -# https://starkandwayne.com/blog/bosh-releases-with-git-lfs/ -RELEASE_BUCKET="mtail-boshrelease" ### @@ -50,23 +47,6 @@ then exit 1 fi -if [ -n "$RELEASE_BUCKET" ] -then - # You need s3cmd installed and with you credentials - if ! [ -x "$(command -v $S3CMD)" ] - then - echo "$S3CMD command not found!" - exit 1 - fi - # Checking if the bucket is there. If not, create it first (this just a check to - # be sure that s3cmd is properly setup and with the correct credentials - if ! $S3CMD ls | grep "s3://$RELEASE_BUCKET" >/dev/null 2>&1 - then - echo "Bucket 's3://$RELEASE_BUCKET' not found! Please create it first!" - exit 1 - fi -fi - case $# in 0) echo "*** Creating a new release. Automatically calculating next release version number" @@ -125,22 +105,16 @@ else $BOSH_CLI create-release --force --final --tarball="/tmp/$RELEASE-$$.tgz" --name "$RELEASE" --version "$version" fi -# Create a release in Github -sha1=$($SHA1 "/tmp/$RELEASE-$$.tgz" | cut -d' ' -f1) -cat < manifest/vars-release-version.yml -releases: -- name: $RELEASE - url: https://github.com/${GITHUB_REPO}/releases/download/v${version}/${RELEASE}-${version}.tgz - version: $version - sha1: $sha1 -EOF # Create a new tag and update the changes echo "* Commiting git changes ..." -git add .final_builds releases/$RELEASE/index.yml "releases/$RELEASE/$RELEASE-$version.yml" config/blobs.yml manifest/vars-release-version.yml +git add .final_builds releases/$RELEASE/index.yml "releases/$RELEASE/$RELEASE-$version.yml" config/blobs.yml blobstore git commit -m "$RELEASE v$version Boshrelease" git push git push --tags +# Create a release in Github +echo "* Creating a new release in Github ... " +sha1=$($SHA1 "/tmp/$RELEASE-$$.tgz" | cut -d' ' -f1) description=$(cat <