Skip to content

fix: correct update.sh script help#2420

Draft
MikeMcC399 wants to merge 1 commit intonodejs:mainfrom
MikeMcC399:update-script-help
Draft

fix: correct update.sh script help#2420
MikeMcC399 wants to merge 1 commit intonodejs:mainfrom
MikeMcC399:update-script-help

Conversation

@MikeMcC399
Copy link
Contributor

Description

In the update.sh script:

  • update example options to use current Node.js versions and latest Debian release (trixie) and ensure the accuracy of examples
  • mark the -s (security option) as reserved. It currently has no effect, however the option is still called, so it needs to be preserved for backwards compatibility, and as a placeholder if it is needed again in future
    const { stdout } = await exec(`./update.sh ${newVersion.isSecurityRelease ? "-s " : ""}${version}`);

Motivation and Context

The help text invoked with ./update.sh -h has several inaccuracies.

  • specifying EOL Node.js versions, such as 8, attempts to update all current versions
  • specifying . alpine on its own also attempts to update all variants
  • the -s security option no longer has any effect

Testing Details

Execute ./update.sh -h and then invoke each one of the listed examples. Confirm that the logs are consistent with the help description.

Example Output

$ ./update.sh -h

  Update the node docker images.

  Usage:
    ./update.sh [-s] [MAJOR_VERSION(S)] [VARIANT(S)]

  Examples:
    - update.sh                         # Update all images
    - update.sh -s                      # Reserved for security update of all images
    - update.sh 24                      # Update all variants of version 24
    - update.sh 22,24                   # Update all variants of version 22 and 24
    - update.sh -s 24                   # Reserved for security update of version 24
    - update.sh . alpine3.23            # Update the alpine3.23 variant for all versions
    - update.sh 24 alpine3.23           # Update only alpine3.23's variants for version 24
    - update.sh . trixie                # Update the trixie variant for all versions
    - update.sh 24 trixie,trixie-slim   # Update only trixie & trixie-slim variants for version 24
    - update.sh -s 24 bullseye          # Reserved for security updates of bullseye variant for version 24

  OPTIONS:
    -s Reserved for security updates. The results are identical whether or not the -s option is specified,
       as this option is currently inactive.
    -h Show this message

Types of changes

  • Documentation
  • Version change (Update, remove or add more Node.js versions)
  • Variant change (Update, remove or add more variants, or versions of variants)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (none of the above)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.

correct and update example options to use current Node.js versions
and latest Debian release
mark -s security option as reserved
@MikeMcC399 MikeMcC399 marked this pull request as ready for review March 16, 2026 14:40
@MikeMcC399 MikeMcC399 mentioned this pull request Mar 16, 2026
12 tasks
@MikeMcC399 MikeMcC399 marked this pull request as draft March 16, 2026 14:44
@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Mar 16, 2026

Conflicts with #2421 so putting into draft state with preference given to other PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

update -h script help option non-working examples

1 participant