Skip to content

Update grailsw scripts and grails-wrapper.jar #574

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

Merged
merged 1 commit into from
May 13, 2025

Conversation

jamesfredley
Copy link
Contributor

@jamesfredley jamesfredley commented May 9, 2025

This PR is the quick update of the grails wrapper scripts and jar which have historically been committed to source code, so that start.grails.org will generate a correct grails application for 7.0.0-SNAPSHOT, in the interim based on the build from https://github.com/apache/grails-core/tree/7.0.x/grails-wrapper

After merge, https://github.com/apache/grails-forge/actions/workflows/next-gcp-deploy.yml will be rerun to deploy the changes for 7.0.0-SNAPSHOT.

These files will later be replaced as part of: https://lists.apache.org/thread/sd0vntrsdlmqn8nnnwpjzbh4fl80sybg

#572

@jamesfredley jamesfredley moved this to In Progress in Apache Grails 7.0.x May 9, 2025
@jamesfredley jamesfredley added this to the grails:7.0.0-M4 milestone May 9, 2025
@jamesfredley jamesfredley self-assigned this May 9, 2025
@jamesfredley jamesfredley requested a review from Copilot May 9, 2025 17:51
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR updates the grailsw scripts for Windows and POSIX to generate a correct Grails 7.0.0-SNAPSHOT application. Key changes include updating error handling and control flow in the Windows batch file and migrating the Unix script from Bash to a minimal POSIX-compatible shell.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
grails-forge-core/src/main/resources/grails-wrapper/grailsw.bat Adjustments in error redirection, control flow labels, and JVM options configuration
grails-forge-core/src/main/resources/grails-wrapper/grailsw Replacement of the Bash shebang and restructuring of the Unix script for improved POSIX compliance
Comments suppressed due to low confidence (3)

grails-forge-core/src/main/resources/grails-wrapper/grailsw:1

  • Changing the shebang from '#!/usr/bin/env bash' to '#!/bin/sh' requires ensuring that no Bash-specific features remain; verify that all shell constructs are fully POSIX-compliant.
#!/bin/sh

grails-forge-core/src/main/resources/grails-wrapper/grailsw.bat:29

  • The control flow change from 'goto init' to 'goto execute' alters the initialization sequence; please confirm that the necessary initialization steps are still performed as expected.
if %ERRORLEVEL% equ 0 goto execute

grails-forge-core/src/main/resources/grails-wrapper/grailsw:128

  • [nitpick] Using shell commands stored in 'cygwin', 'darwin', and 'nonstop' for boolean evaluation is clever; please verify that these variables reliably contain the commands 'true' or 'false' to maintain consistency across different POSIX shells.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then

@jamesfredley jamesfredley requested a review from matrei May 9, 2025 18:03
@jamesfredley jamesfredley linked an issue May 9, 2025 that may be closed by this pull request
@jamesfredley jamesfredley merged commit b55acc0 into 7.0.x May 13, 2025
9 checks passed
@jamesfredley jamesfredley deleted the grails-wrapper-updates branch May 13, 2025 01:06
@github-project-automation github-project-automation bot moved this from In Progress to Done in Apache Grails 7.0.x May 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Running Grails Wrapper results in an error
3 participants