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

Let update-mod-version take a PACKAGE_PREFIX env var #808

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

brandur
Copy link
Contributor

@brandur brandur commented Mar 17, 2025

Here, have update-mod-version take a PACKAGE_PREFIX env var that
dictates which prefix it'll operate on, defaulting the previous behavior
of github.com/riverqueue/river.

The idea here is that we should be able to use reuse this command from
other River repositories like rivercontrib to update internal cross
dependencies.

@brandur brandur force-pushed the brandur-package-prefix branch from 44c3807 to 3c5d19c Compare March 17, 2025 07:10
Comment on lines 30 to 32
// Allows secondary River repositories to make use of this command by
// specifying their own prefix.
packagePrefix := cmp.Or(os.Getenv("PACKAGE_PREFIX"), "github.com/riverqueue/river")
Copy link
Contributor

Choose a reason for hiding this comment

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

Could just make this a required input and skip having a default value? Your call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, good point. Can't hurt to be explicit about this. Updated the command and added PATH_PREFIX in this project's Makefile.

@brandur brandur force-pushed the brandur-package-prefix branch from 3c5d19c to 57749a2 Compare March 17, 2025 15:56
Here, have `update-mod-version` take a `PACKAGE_PREFIX` env var that
dictates which prefix it'll operate on, defaulting the previous behavior
of `github.com/riverqueue/river`.

The idea here is that we should be able to use reuse this command from
other River repositories like `rivercontrib` to update internal cross
dependencies.
@brandur brandur force-pushed the brandur-package-prefix branch from 57749a2 to 0310ef8 Compare March 17, 2025 15:56
@brandur
Copy link
Contributor Author

brandur commented Mar 18, 2025

Thanks!

@brandur brandur merged commit 39833f0 into master Mar 18, 2025
10 checks passed
@brandur brandur deleted the brandur-package-prefix branch March 18, 2025 05:56
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.

2 participants