Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ test/integration/testdata/minikube-linux-amd64-latest-stable
hack/legacy_fill_db/gopogh_filldb_log.txt
hack/legacy_fill_db/out/output_summary.json
hack/legacy_fill_db/out/output.html
hack/go-licenses
19 changes: 12 additions & 7 deletions hack/jenkins/release_build_and_upload.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,20 @@ env BUILD_IN_DOCKER=y \
"out/docker-machine-driver-kvm2-${RPM_VERSION}-${RPM_REVISION}.x86_64.rpm"

# check if 'commit: <commit-id>' line contains '-dirty' commit suffix
BUILT_VERSION=$("out/minikube-$(go env GOOS)-$(go env GOARCH)" version)
echo ${BUILT_VERSION}

COMMIT=$(echo ${BUILT_VERSION} | grep 'commit:' | awk '{print $2}')
if (echo ${COMMIT} | grep -q dirty); then
echo "'minikube version' reports dirty commit: ${COMMIT}"
BUILT_VERSION="$(out/minikube-$(go env GOOS)-$(go env GOARCH) version)"
echo "$BUILT_VERSION"
# Extract commit hash from the correct line
COMMIT=$(echo "$BUILT_VERSION" | grep '^commit:' | awk '{print $2}')

if echo "$COMMIT" | grep -q dirty; then
echo "'minikube version' reports dirty commit: $COMMIT"
echo "------------------------------------------------------------------------"
echo "The following uncommitted changes are causing the build to be dirty:"
git status --porcelain
echo "------------------------------------------------------------------------"
echo "To fix this, commit or stash the above changes."
exit 1
fi

# Don't upload temporary copies, avoid unused duplicate files in the release storage
rm -f out/minikube-linux-x86_64
rm -f out/minikube-linux-i686
Expand Down