Skip to content

Conversation

@lorenzleutgeb
Copy link
Member

@lorenzleutgeb lorenzleutgeb commented Dec 20, 2021

Introduce a mechanism to pass "Build Properties" (version number, hash of the source revision, etc.) to the resulting artifact. Mainly to allow Alpha report its own version, which is implemented as example.

This contents of META-INF/build.properties must be kept reproducible, i.e. only depend on our Git repository as input, not use timestamps, current hostname or weather...

@lorenzleutgeb lorenzleutgeb marked this pull request as ready for review December 20, 2021 09:43
@codecov
Copy link

codecov bot commented Dec 20, 2021

Codecov Report

Merging #331 (1293c40) into master (d42818a) will decrease coverage by 0.07%.
The diff coverage is 23.07%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #331      +/-   ##
============================================
- Coverage     70.23%   70.15%   -0.08%     
  Complexity     2123     2123              
============================================
  Files           182      182              
  Lines          8023     8036      +13     
  Branches       1423     1424       +1     
============================================
+ Hits           5635     5638       +3     
- Misses         2028     2037       +9     
- Partials        360      361       +1     
Impacted Files Coverage Δ
.../tuwien/kr/alpha/app/config/CommandLineParser.java 80.07% <23.07%> (-2.82%) ⬇️

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 d42818a...1293c40. Read the comment docs.

Copy link
Collaborator

@madmike200590 madmike200590 left a comment

Choose a reason for hiding this comment

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

Works as expected so far, -version CLI flag correctly outputs build.properties content.

However, we have duplicate zip entries for the build.properties file (gets created once by each module). This has two immediate consequences:

  • Our jar files become invalid for unzip, i.e. unzipping of the bundled jar is no longer possible (see this issue for some background information) due to these duplicate entries.
  • In a setting where different modules of alpha get packaged into one jar that do not share the exact same version, an overwrite-strategy for duplicate handling would destroy information (likelyhood of that seems pretty low).

While I'm not too concerned about the second item, I think we do need a fix for the invalid zip issue.

@lorenzleutgeb
Copy link
Member Author

Right. Thanks for catching this.

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.

3 participants