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

feat: recognize x-version-update markers in ClientVersion.java #317

Closed
wants to merge 1 commit into from

Conversation

igorbernstein2
Copy link

It would be very useful to have a way for client developers to embed the project version inside a java class.
There are currently 2 approaches that client devs can use:

  1. read the jar manifest
  2. use resource filtering to inject maven properties into a resource file

However both of these have limitations:

  1. doesn't work when the client code is shaded into a parent uberjar
  2. doesn't work when imported in g3

This new approach solves all of the limitations by allowing client devs to read it directly from a compiled class file which will always be available

It would be very useful to have a way for client developers to embed the project version inside a java class. 
There are currently 2 approaches that client devs can use:
1. read the jar manifest
2. use resource filtering to inject maven properties into a resource file

However both of these have limitations:
1. doesn't work when the client code is shaded into a parent uberjar
2. doesn't work when imported in g3

This new approach solves all of the limitations by allowing client devs to read it directly from a compiled class file which will always be available
@igorbernstein2 igorbernstein2 requested a review from a team as a code owner April 9, 2021 15:07
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Apr 9, 2021
@chingor13
Copy link
Contributor

We probably want this in release-please. This is the legacy tool that must be run from the command line

igorbernstein2 added a commit to igorbernstein2/java-bigtable that referenced this pull request Apr 9, 2021
Use new feature in releasetool (googleapis/releasetool#317) to manage the client version instead of maven tricks introduced in googleapis#451
@chingor13
Copy link
Contributor

Closing this in favor of googleapis/release-please#850

@chingor13 chingor13 closed this Apr 9, 2021
igorbernstein2 added a commit to googleapis/java-bigtable that referenced this pull request Apr 13, 2021
* chore: improve embedded version handling

Use new feature in releasetool (googleapis/releasetool#317) to manage the client version instead of maven tricks introduced in #451

* migrate to new version scheme

* rename back to Version

* config release-please for version bumps

* make sure file doesnt get clobbered

* add a couple of tests

* fmt
kolea2 pushed a commit to kolea2/java-bigtable that referenced this pull request May 20, 2021
* chore: improve embedded version handling

Use new feature in releasetool (googleapis/releasetool#317) to manage the client version instead of maven tricks introduced in googleapis#451

* migrate to new version scheme

* rename back to Version

* config release-please for version bumps

* make sure file doesnt get clobbered

* add a couple of tests

* fmt

(cherry picked from commit 1af8925)
kolea2 added a commit to googleapis/java-bigtable that referenced this pull request May 21, 2021
* chore: improve embedded version handling (#715)

* chore: improve embedded version handling

Use new feature in releasetool (googleapis/releasetool#317) to manage the client version instead of maven tricks introduced in #451

* migrate to new version scheme

* rename back to Version

* config release-please for version bumps

* make sure file doesnt get clobbered

* add a couple of tests

* fmt

(cherry picked from commit 1af8925)

* update version

* fix test

* fix: add back in extraFiles and fix file path (#833)

(cherry picked from commit f914954)

* fix test

Co-authored-by: Igor Bernstein <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants