Add git commit hash to MANIFEST.MF file.
sclassen opened this issue Β· comments
ππ₯ First Timers Only
This issue is reserved for people who never contributed to Rico or Open Source before. We know that the process of creating a pull request is the biggest barrier for new contributors. This issue is for you π
πΎ Description of the issue
Add git commit hash to MANIFEST.MF file.
It would be very nice to include the git commit from which a jar file was built into its MANIFEST.MF file.
The task is to use "net.nemerosa.versioning" or another gradle plugin to make the git commit has available at build time.
Then as the second step include the git commit hash in the MANIFEST.MF
The content of the MANIFEST.MF is defined in the build.gradle
file.
π Step by Step
To solve this issue and contribute a fix you should check the following step-by-step list. A more detailed documentation of the workflow can be found here.
- Claim this issue: Comment below.
- Fork the repository in github by simply clicking the 'fork' button.
- Check out the forked repository
- Create a feature branch for the issue. We do not have any naming definition for branches.
- Commit your changes.
- Start a Pull Request.
- Done π Ask in comments for a review :)
- If the reviewer find some missing peaces or a problem he will start a discussion with you and describe the next steps how the problem can be solved.
- You did it π We will merge the fix in the master branch.
- Thanks, thanks, thanks for being part of this project as an open source contributor β€οΈ
π Contribute to Hacktoberfest
Solve this issue as part of the Hacktoberfest event and get a change to receive cool goodies like a T-Shirt. π½
π€β Questions
If you have any questions just ask us directly in this issue by adding a comment. Next to this you can find a general manual about open source contributions here.
Hello @sclassen, can you clarify this issue? I am not able to understand but I want to contribute to this project.
I can try to give more details:
The current build tool for the rico project is gradle. If you do not know gradle you can find many resources in the internet.
But since it is a very elaborate tool there are many aspects to it and the documentation is very big.
For the task at hand it is important to know that gradle comes with very little in its core and every project can customize the build using plugins.
net.nemerosa.versioning
is a gradle plugin which searches for a vcs (version control system) in the project (e.g. GIT). If one is found the plugin extracts different pieces of information from from the vcs.
These pieces are stored as properties during the build process. Such properties can be accessed by other plugins.
Another plugin which we are using is the java plugin. It compiles the java files and builds the JAR. It also creates the MANIFEST.MF file which contains meta information about the JAR and is included in the same.
The goal is now to add the net.nemerosa.versioning
plugin to the build.gradle file and configure it according to the documentation which can be found on the github page of the plugin.
Once it is added and configured the second step is to extend the MANIFEST.MF content with the commit hash which now is made available by net.nemerosa.versioning
.
All changes for this task should be made to the build.gradle
file.