Skip to content

Commit

Permalink
Release v1.2.1 for MC 1.21.0 Fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
cpburnz committed Dec 23, 2024
1 parent c992c13 commit 7919ba7
Show file tree
Hide file tree
Showing 6 changed files with 265 additions and 234 deletions.
8 changes: 4 additions & 4 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@ Change History
==============


1.2.1 for Minecraft 1.21.1 with Fabric 0.103.0 (2024-08-28)
1.2.1 for Minecraft 1.21.0 with Fabric 0.102.0 (2024-12-22)
-----------------------------------------------------------

New features:

- Support Minecraft 1.21.1 with Fabric.
- Support Minecraft 1.21.0 with Fabric.

Bug fixes:

- Prevent possible crash on bad start-up.


1.2.0 for Minecraft 1.21.1 with Fabric 0.103.0 (Unreleased)
1.2.0 for Minecraft 1.21.0 with Fabric 0.102.0 (Unreleased)
-----------------------------------------------------------

New features:
Expand All @@ -28,7 +28,7 @@ Bug fixes:
- Support multithreaded dimension ticks.


1.1.0 for Minecraft 1.21.1 with Fabric 0.103.0 (Unreleased)
1.1.0 for Minecraft 1.21.0 with Fabric 0.102.0 (Unreleased)
-----------------------------------------------------------

New features:
Expand Down
44 changes: 14 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,8 @@
This mod provides a Prometheus exporter for Minecraft. It exports metrics
related to the Minecraft server and the JVM for consumption by the open-source
systems monitoring toolkit, [Prometheus]. The mod is intended for server-side
use, and does not need to be installed client-side. This currently has builds
for the following versions:

- Minecraft 1.21.1 with Fabric 0.103.0.
- Minecraft 1.21.1 with Forge 52.0.0.
- Minecraft 1.21.1 with NeoForge 21.1.0.
- Minecraft 1.20.6 with Forge 50.1.0.
- Minecraft 1.20.4 with Forge 49.1.0.
- Minecraft 1.20.4 with NeoForge 20.4.0.
- Minecraft 1.20.2 with Forge 48.1.0.
- Minecraft 1.20.1 with Forge 47.1.0.
- Minecraft 1.19.3 with Forge 44.1.0.
- Minecraft 1.19.2 with Forge 43.0.0.
- Minecraft 1.18.2 with Forge 40.2.0.
- Minecraft 1.18.1 with Forge 39.0.0.
- Minecraft 1.16.5 with Forge 36.2.0.
- Minecraft 1.15.2 with Forge 21.2.0.
- Minecraft 1.14.4 with Forge 28.1.0.
- Minecraft 1.12.2 with Forge 14.23.0.
- Minecraft 1.7.10 with Forge 10.13.4.
use, and does not need to be installed client-side. You can find the latest
builds for various versions of Minecraft and mod loaders in [Releases].

Is there a newer version of Minecraft not listed? Is the mod outdated for one of
the listed Minecraft versions? Let me know by opening an [issue on GitHub].
Expand All @@ -31,19 +13,20 @@ Installation

The Prometheus Exporter mod only needs to be installed on the server. It can be
downloaded from [GitHub] and [Curse Forge]. To install it, copy the JAR
(*Prometheus-Exporter-{MC Version}-fabric-{Mod Version}.jar*) to the server
*mods/* directory. Since this mod does not add anything to the Minecraft world,
it can be safely upgraded by simply replacing an older version with a newer
version.
(*Prometheus-Exporter-{MC Version}-{Mod Loader}-{Mod Version}.jar*) to the
server *mods/* directory. Since this mod does not add anything to the Minecraft
world, it can be safely upgraded by simply replacing an older version with a
newer version.


Configuration
-------------

The mod configuration is located at *world/serverconfig/prometheus_exporter-server.toml*
with Forge, and *config/prometheus_exporter-server.toml* with NeoForge. It will
be automatically generated upon server start if it does not already exist. The
default configuration can be seen in the example [prometheus_exporter-server.toml].
with Forge and Fabric, and *config/prometheus_exporter-server.toml* with
NeoForge. It will be automatically generated upon server start if it does not
already exist. The default configuration can be seen in the example
[prometheus_exporter-server.toml].


Exporter
Expand All @@ -63,8 +46,9 @@ Known compatible Grafana dashboards are listed in [dashboards.md].
[Curse Forge]: https://www.curseforge.com/minecraft/mc-mods/prometheus-exporter
[GitHub]: https://github.com/cpburnz/minecraft-prometheus-exporter/releases
[Prometheus]: https://prometheus.io/
[Releases]: https://github.com/cpburnz/minecraft-prometheus-exporter/wiki/Releases
[dashboards.md]: https://github.com/cpburnz/minecraft-prometheus-exporter/blob/master/dashboards.md
[issue on GitHub]: https://github.com/cpburnz/minecraft-prometheus-exporter/issues
[metrics.md]: https://github.com/cpburnz/minecraft-prometheus-exporter/blob/mc1.21.1-fabric/metrics.md
[output.txt]: https://github.com/cpburnz/minecraft-prometheus-exporter/blob/mc1.21.1-fabric/examples/output.txt
[prometheus_exporter-server.toml]: https://github.com/cpburnz/minecraft-prometheus-exporter/blob/mc1.21.1-fabric/examples/prometheus_exporter-server.toml
[metrics.md]: https://github.com/cpburnz/minecraft-prometheus-exporter/blob/mc1.21.0-fabric/metrics.md
[output.txt]: https://github.com/cpburnz/minecraft-prometheus-exporter/blob/mc1.21.0-fabric/examples/output.txt
[prometheus_exporter-server.toml]: https://github.com/cpburnz/minecraft-prometheus-exporter/blob/mc1.21.0-fabric/examples/prometheus_exporter-server.toml
58 changes: 51 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ plugins {
id 'fabric-loom' version '1.7-SNAPSHOT'

// Shadow Jar plugin: bundle dependencies.
id 'com.gradleup.shadow' version '8.3.0'
id 'com.gradleup.shadow' version '8.3.5'

// CurseForge plugin.
id 'net.darkhax.curseforgegradle' version '1.1.25'

// GitHub plugin.
id 'com.github.breadmoirai.github-release' version '2.5.2'
}

// Project settings.
Expand Down Expand Up @@ -98,9 +104,9 @@ processResources {
}

// Project JAR settings.
tasks.named('jar', Jar).configure {
jar {
// Include the Minecraft version in the JAR name.
archiveAppendix = "${minecraft_version}-fabric"
archiveAppendix = "${minecraft_version_tag}-fabric"

manifest {
attributes([
Expand All @@ -119,8 +125,7 @@ tasks.named('jar', Jar).configure {
}

// Configure Shadow Jar.
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar;
tasks.named('shadowJar', ShadowJar).configure {
shadowJar {
// Remove JAR suffix.
archiveAppendix = tasks.jar.archiveAppendix
archiveClassifier = tasks.jar.archiveClassifier
Expand All @@ -137,8 +142,7 @@ tasks.named('shadowJar', ShadowJar).configure {
}

// Remap the Shadow Jar because the Minecraft classes must be obfuscated.
import net.fabricmc.loom.task.RemapJarTask;
tasks.named('remapJar', RemapJarTask).configure {
remapJar {
// Include the Minecraft version in the JAR name.
archiveAppendix = jar.archiveAppendix

Expand All @@ -161,3 +165,43 @@ java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

// Publish release to CurseForge.
import net.darkhax.curseforgegradle.TaskPublishCurseForge
tasks.register('publishCurseForge', TaskPublishCurseForge) {
var curseforge_token = System.env.CURSEFORGE_TOKEN
var project_id = 351938

apiToken = curseforge_token

upload(project_id, remapJar.archiveFile) {
changelog = file('CHANGES.md').filterLine {
!it.startsWith('Change History') && !it.startsWith('====')
}.toString()
changelogType = 'markdown'
releaseType = 'release'

addEnvironment 'Server'
addRequirement 'fabric-api'
}
}

// Publish release to GitHub.
githubRelease {
var branch = "mc${minecraft_version_tag}-fabric"
var changes_url = "https://github.com/cpburnz/minecraft-prometheus-exporter/blob/${branch}/CHANGES.md"
var github_token = System.env.GITHUB_TOKEN

body = "Release v${mod_version} for Minecraft ${minecraft_version_tag} with Fabric ${fabric_version_min}. See [CHANGES.md](${changes_url})."
draft = false
releaseAssets = remapJar.archiveFile
releaseName = "Minecraft ${minecraft_version_tag} (Fabric) / v${mod_version}"
repo = 'minecraft-prometheus-exporter'
tagName = "${minecraft_version_tag}-fabric-${mod_version}"
targetCommitish = branch
token = github_token ?: ""
}

// Alias for publishing to GitHub.
tasks.register('publishGithub')
tasks.publishGithub.dependsOn tasks.githubRelease
Loading

0 comments on commit 7919ba7

Please sign in to comment.