Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[1.6.4] [SOLVED] Jenkins and appending the Build Number to Version Number

Featured Replies

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.