Skip to content

Commit

Permalink
Merge pull request #5388 from tstromberg/markdown-fix
Browse files Browse the repository at this point in the history
Include ISO files as part of a GitHub release
  • Loading branch information
tstromberg committed Sep 18, 2019
2 parents 83c8f25 + 0651116 commit 9877f78
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions hack/jenkins/release_github_page.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ set -eux -o pipefail
readonly VERSION="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}"
readonly DEB_VERSION="${VERSION/-/\~}"
readonly RPM_VERSION="${DEB_VERSION}"

readonly ISO_BUCKET="minikube/iso"
readonly TAGNAME="v${VERSION}"

readonly GITHUB_ORGANIZATION="kubernetes"
Expand All @@ -40,7 +40,7 @@ if ! [[ ${VERSION_BUILD} =~ ^[0-9]+$ ]]; then
RELEASE_FLAGS="-p"
fi

RELEASE_NOTES=$(perl -e "\$p=0; while(<>) { if(/^## Version ${VERSION}/) { \$p=1 } elsif (/^##/) { \$p=0 }; if (\$p) { print }}" < CHANGELOG.md)
RELEASE_NOTES=$(perl -e "\$p=0; while(<>) { if(/^## Version ${VERSION} -/) { \$p=1 } elsif (/^##/) { \$p=0 }; if (\$p) { print }}" < CHANGELOG.md)
if [[ "${RELEASE_NOTES}" = "" ]]; then
RELEASE_NOTES="(missing for ${VERSION})"
fi
Expand Down Expand Up @@ -90,6 +90,15 @@ FILES_TO_UPLOAD=(
'docker-machine-driver-hyperkit.sha256'
)

# ISO files are special, as they are generated pre-release tagging
ISO_FILES=("minikube-v${VERSION}.iso" "minikube-v${VERSION}.iso.sha256")
for DOWNLOAD in "${ISO_FILES[@]}"
do
gsutil cp "gs://${ISO_BUCKET}/${DOWNLOAD}" out/ \
&& FILES_TO_UPLOAD+=("${DOWNLOAD}") \
|| echo "${DOWNLOAD} was not generated for this release"
done

for UPLOAD in "${FILES_TO_UPLOAD[@]}"
do
n=0
Expand All @@ -101,7 +110,7 @@ do
--tag "${TAGNAME}" \
--name "$UPLOAD" \
--file "out/$UPLOAD" && break
n=$[$n+1]
n=$((n+1))
sleep 15
done
done

0 comments on commit 9877f78

Please sign in to comment.