Skip to content

Internal: Scripting the beta release process [ED-20063]#31873

Merged
Ntnelbaba merged 6 commits intomainfrom
ED-20063-scripting-beta-release-process
Jul 15, 2025
Merged

Internal: Scripting the beta release process [ED-20063]#31873
Ntnelbaba merged 6 commits intomainfrom
ED-20063-scripting-beta-release-process

Conversation

@Ntnelbaba
Copy link
Copy Markdown
Contributor

@Ntnelbaba Ntnelbaba commented Jul 15, 2025

PR Checklist

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Summary

This PR can be summarized in the following changelog entry:

Description

An explanation of what is done in this PR

Test instructions

This PR can be tested by following these steps:

Quality assurance

  • I have tested this code to the best of my abilities
  • I have added unittests to verify the code works as intended
  • Docs have been added / updated (for bug fixes / features)

Fixes #

✨ PR Description

Purpose: Add automation script for the beta release process to streamline version management and branch creation workflows.

Main changes:

  • Added prepare-beta-release.sh script to automate branch creation and version bumping for beta releases
  • Created npm release-beta command to execute the automation script with proper permissions
  • Implemented version calculations and configurable dry-run mode with interactive prompts

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using. We'd love your feedback! 🚀

gitstream-cm[bot]

This comment was marked as resolved.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jul 15, 2025

Elementor Build

Last updated at: 20250715.1048
Version: 3.31.0-20250715.1048

✅ Elementor build is ready for download.

You can download the latest build from the link below:

🔗 elementor-3.31.0-20250715.1048.zip

The build is available for 3 days.

gitstream-cm[bot]

This comment was marked as resolved.

Svitlana-Dykun
Svitlana-Dykun previously approved these changes Jul 15, 2025
gitstream-cm[bot]

This comment was marked as resolved.

@Ntnelbaba Ntnelbaba requested a review from Svitlana-Dykun July 15, 2025 10:46
Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com>
gitstream-cm[bot]

This comment was marked as resolved.

Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@gitstream-cm gitstream-cm bot left a comment

Choose a reason for hiding this comment

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

✨ PR Review

The shell script implementation addresses the chmod security issue from previous reviews, but the critical variable expansion problem in sed commands remains unresolved and will prevent the script from functioning correctly.

1 issues detected:

🐞 Bug - Variables in single-quoted strings are not expanded by the shell, causing literal text replacement instead of variable substitution.

Details: Shell variables within sed commands are not properly expanded due to single quote usage in the replacement patterns. The script will insert literal '$DEV_VERSION' text instead of the actual version value when updating files.
File: scripts/prepare-beta-release.sh (81-82)

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using. We'd love your feedback! 🚀

Comment on lines +81 to +82
execOrLog "sed -i '' -E 's/(\* Version: )[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?/\1$DEV_VERSION/' elementor.php"
execOrLog "sed -i '' -E 's/(define\( 'ELEMENTOR_VERSION', ')[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?'\)/\1$DEV_VERSION'\)/' elementor.php"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🐞 Bug - Variable Expansion Issue: Use double quotes for the sed command and properly escape the variable expansion, or use a different approach like separate variable assignment before the sed command.

Suggested change
execOrLog "sed -i '' -E 's/(\* Version: )[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?/\1$DEV_VERSION/' elementor.php"
execOrLog "sed -i '' -E 's/(define\( 'ELEMENTOR_VERSION', ')[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?'\)/\1$DEV_VERSION'\)/' elementor.php"
execOrLog "sed -i '' -E \"s/(\* Version: )[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?/\1$DEV_VERSION/\" elementor.php"
execOrLog "sed -i '' -E \"s/(define\( 'ELEMENTOR_VERSION', ')[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?'\)/\1$DEV_VERSION'\)/\" elementor.php"

Copy link
Copy Markdown
Contributor

@gitstream-cm gitstream-cm bot left a comment

Choose a reason for hiding this comment

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

✨ PR Review

The beta release script implementation is comprehensive with good error handling and dry-run functionality, but contains a critical variable expansion issue in the sed commands that will prevent proper version updates.

1 issues detected:

🐞 Bug - Single quotes prevent shell variable expansion in sed replacement patterns

Details: The sed commands use single quotes around the replacement pattern which prevents shell variable expansion. The script will update version strings with literal '$DEV_VERSION' instead of the actual version value, causing incorrect version updates in elementor.php.
File: scripts/prepare-beta-release.sh (81-82)

Generated by LinearB AI and added by gitStream.
AI-generated content may contain inaccuracies. Please verify before using. We'd love your feedback! 🚀

Comment on lines +81 to +82
execOrLog "sed -i '' -E 's/(\* Version: )[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?/\1$DEV_VERSION/' elementor.php"
execOrLog "sed -i '' -E 's/(define\( 'ELEMENTOR_VERSION', ')[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?'\)/\1$DEV_VERSION'\)/' elementor.php"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🐞 Bug - Variable Expansion Issue: Replace single quotes with double quotes in the sed replacement patterns, or use string concatenation to properly expand the $DEV_VERSION variable.

Suggested change
execOrLog "sed -i '' -E 's/(\* Version: )[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?/\1$DEV_VERSION/' elementor.php"
execOrLog "sed -i '' -E 's/(define\( 'ELEMENTOR_VERSION', ')[0-9]+\.[0-9]+\.[0-9]+(-[a-z0-9]+)?'\)/\1$DEV_VERSION'\)/' elementor.php"
execOrLog "sed -i '' -E \"s/(\\* Version: )[0-9]+\\.[0-9]+\\.[0-9]+(-[a-z0-9]+)?/\\1$DEV_VERSION/\" elementor.php"
execOrLog "sed -i '' -E \"s/(define\\( 'ELEMENTOR_VERSION', ')[0-9]+\\.[0-9]+\\.[0-9]+(-[a-z0-9]+)?'\\)/\\1$DEV_VERSION'\\)/\" elementor.php"

@Ntnelbaba Ntnelbaba merged commit 6cfd95f into main Jul 15, 2025
39 of 40 checks passed
@Ntnelbaba Ntnelbaba deleted the ED-20063-scripting-beta-release-process branch July 15, 2025 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants