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

[Jib CLI] set correct version and User-Agent #3150

Merged
merged 1 commit into from
Mar 18, 2021
Merged

Conversation

chanseokoh
Copy link
Member

@chanseokoh chanseokoh commented Mar 18, 2021

Fixes #3149.

This will make Jib CLI use the version string as defined in jib-cli/gradle-properties for the User-Agent HTTP header and the output of $ jib --version.

Notes:

  • Moves VersionInfo.java out of src/main/java into src/java-templates and converts it to a template.
  • When compiling, it generates the final VersionInfo.java into build/generated-src while incorporating the version Gradle property into the template. The process is done with the Gradle Copy task.

I'm not sure if IntelliJ will require this, but you may need to run the :jib-cli:compileJava task once after re-configuring the project.

@codecov
Copy link

codecov bot commented Mar 18, 2021

Codecov Report

Merging #3150 (73ecf6d) into master (5cfc9c8) will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #3150      +/-   ##
============================================
+ Coverage     71.08%   71.09%   +0.01%     
+ Complexity     2320     2319       -1     
============================================
  Files           280      279       -1     
  Lines          9825     9822       -3     
  Branches        992      992              
============================================
- Hits           6984     6983       -1     
+ Misses         2495     2493       -2     
  Partials        346      346              

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5cfc9c8...73ecf6d. Read the comment docs.

@chanseokoh chanseokoh mentioned this pull request Mar 18, 2021
@chanseokoh chanseokoh merged commit 5c5cf90 into master Mar 18, 2021
@chanseokoh chanseokoh deleted the fix-jib-cli-version branch March 18, 2021 21:22
davidtron added a commit to davidtron/jib that referenced this pull request Mar 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Jib CLI] version in User-Agent and CLI output is fixed to be "preview"
2 participants