Posted October 20, 201311 yr I am working on a mod with some buddies of mine and I want to make it so whenever Jenkins builds our mod, it appends the build number to the version number (so "0.0.1" because "0.0.1.103"). This would make it so we do not have to manually increment it everytime we commit. From my understanding of Java (I am a C++/Python guy myself), everything has to be in a class. It cannot run unless it is in a class. Also, the entry point for the mod is the base mod file. It is the first thing that runs. So nothing in out mod can run before it. Also, the version number has to be a constant (final). Therefore, as far as I know, there is no way to programmically set the version number with out a fancy bash script that did a find and replace. I was wondering if anyone knows how to append the build number automatically to the version number or knows how to write the bashscript to do it automatically off the top of their head (I hate writing bash scripts). EDIT: I figured it out. Use you can use an "mcmod.info" file and do a sed to replace a placeholder text with the build number.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.