Skip to content
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

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

Closed
jsjoeio opened this issue Jan 4, 2022 · 1 comment
Closed
Labels
chore Related to maintenance or clean up
Milestone

Comments

@jsjoeio
Copy link
Contributor

jsjoeio commented Jan 4, 2022

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
@jsjoeio jsjoeio added chore Related to maintenance or clean up help-wanted labels Jan 4, 2022
@jsjoeio jsjoeio added this to the On Deck milestone Jan 4, 2022
@jsjoeio jsjoeio mentioned this issue Jan 4, 2022
11 tasks
jsjoeio added a commit that referenced this issue Jan 4, 2022
I didn't realize this but our release-prep.sh script will accidentally update
all strings in the package.json that match the version udpate.

This means if a dependency is 4.0.0 and we're upgrading code-server to 4.0.1,
our script updates the dependency too.

Oops. Documented here: #4679
jsjoeio added a commit that referenced this issue Jan 4, 2022
I didn't realize this but our release-prep.sh script will accidentally update
all strings in the package.json that match the version udpate.

This means if a dependency is 4.0.0 and we're upgrading code-server to 4.0.1,
our script updates the dependency too.

Oops. Documented here: #4679
@stale
Copy link

stale bot commented Jul 3, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no activity occurs in the next 5 days.

@stale stale bot added the stale label Jul 3, 2022
@stale stale bot closed this as completed Jul 8, 2022
@code-asher code-asher removed the stale label Jul 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Related to maintenance or clean up
Projects
None yet
Development

No branches or pull requests

2 participants