Skip to content

fix release-prep script replacing dependencies versions in package.json #4679

Closed
@jsjoeio

Description

@jsjoeio

Problem

When we prep a release, we run a script locally called release-prep.sh.

In it, there is a line that uses rg and sd to bump the version across the project (i.e. 4.0.0 -> 4.0.1).

Unfortunately, this means if there is a dependency with the same version we're bumping, it will bump that too 😅

Here is the exact line where we do this:
https://github.com/coder/code-server/blob/main/ci/build/release-prep.sh#L84

Example

image

Solution

It might be worth breaking this into two lines:

  1. first rg -> sd replaces the first instance in package.json
  2. ignores package.json but updates the other files (i.e. markdown)

To summarize, we should split the current functionality into two calls:

  • update the package.json (only first string it finds)
  • update the markdown files

Metadata

Metadata

Assignees

No one assigned

    Labels

    choreRelated to maintenance or clean up

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions