Skip to content

Changed version.required field to true from false. #11592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

devc007
Copy link
Contributor

@devc007 devc007 commented Jul 4, 2025

Description

Fixes #11552

Change Type

/kind cleanup

Changelog

NONE

@github-actions github-actions bot added do-not-merge/kind-invalid Indicates a PR lacks a `kind/foo` label and requires one. do-not-merge/release-note-invalid Indicates that a PR should not merge because it's missing one of the release note labels. kind/fix Categorizes issue or PR as related to a bug. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note release-note-none and removed do-not-merge/kind-invalid Indicates a PR lacks a `kind/foo` label and requires one. kind/fix Categorizes issue or PR as related to a bug. do-not-merge/release-note-invalid Indicates that a PR should not merge because it's missing one of the release note labels. release-note labels Jul 4, 2025
@devc007 devc007 changed the title Release: Changed version.required field to true from false. Changed version.required field to true from false. Jul 4, 2025
@github-actions github-actions bot added release-note and removed do-not-merge/kind-invalid Indicates a PR lacks a `kind/foo` label and requires one. release-note-none labels Jul 4, 2025
@github-actions github-actions bot added kind/feature Categorizes issue or PR as related to a new feature. and removed kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. labels Jul 9, 2025
@shashankram shashankram added release-note-none and removed release-note kind/feature Categorizes issue or PR as related to a new feature. labels Jul 9, 2025
@github-actions github-actions bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Jul 9, 2025
Comment on lines 64 to 66
elif [[ $GITHUB_REF == refs/tags/* ]]; then
VERSION="${GITHUB_REF#refs/tags/}"
echo "goreleaser_args=--clean" >> $GITHUB_OUTPUT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? This was for the manual version case which is no longer applicable

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed - I think we can also simplify the conditional on line 55 now that input.version is required:

          if [[ ${{ github.event_name }} == 'workflow_dispatch' ]]; then
            VERSION="${{ inputs.version }}"
            # Validate semver format. Modified version from the recommended semver format.
            # See https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string.
            if ! echo "$VERSION" | grep -E "^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-((0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$" > /dev/null; then
              echo "Error: Version '$VERSION' does not match required semver format (e.g., v1.2.3, v2.0.0-alpha.1)"
              exit 1
            fi
            echo "goreleaser_args=--clean --skip=validate" >> $GITHUB_OUTPUT

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shashankram @timflannagan thanks for review, I am working on these. will have PR soon.

@devc007 devc007 force-pushed the version_required_now branch from af670a3 to 874ae60 Compare July 9, 2025 18:36
@devc007
Copy link
Contributor Author

devc007 commented Jul 9, 2025

Sorry i had made changes in
874ae60 i thought push was incorrect so revert the change and reapply resulting to messy pr commits, I tried to solve but it made it worse.

@timflannagan
Copy link
Member

@devc007 Updated version looks good. Can we simplify the conditional outlined in the #11592 (comment)? I think we're good after that to merge 👍

Copy link
Member

@timflannagan timflannagan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. release-note-none
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Release: Make Workflow Dispatch Version Required
3 participants