Skip to content

Commit c369192

Browse files
authored
refactor: Improve project versioning (#391)
1 parent 4c2b458 commit c369192

File tree

19 files changed

+188
-249
lines changed

19 files changed

+188
-249
lines changed

CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,12 @@ of a few ways:
109109
This component is used to embed the current version of the software into the documentation. An example of this would be:
110110

111111
```jsx
112-
<SoftwareVersion versionType={"maj-min"}/> // E.g 1.19.2
113-
<SoftwareVersion versionType={"maj"}/> // E.g 1.19
114-
<SoftwareVersion versionType={"max"}/> // E.g 1.20.4
112+
<SoftwareVersion versionType={"maj-min-pat"}/> // e.g. 1.19.2
113+
<SoftwareVersion versionType={"maj-min"}/> // e.g. 1.19
114+
<SoftwareVersion versionType={"maj"}/> // e.g. 1
115115

116-
// You can set the project name to be used for the versioning:
117-
<SoftwareVersion versionType={"maj-min"} project={"velocity"}/> // Project defaults to Paper
116+
// You can set the project name to be used for the versioning (defaults to paper):
117+
<SoftwareVersion versionType={"maj-min-pat"} project={"velocity"}/> // e.g. 3.3.0-SNAPSHOT
118118
```
119119

120120
2. `Javadoc` component
@@ -137,17 +137,17 @@ of a few ways:
137137
version: '1.0'
138138
main: io.papermc.testplugin.TestPlugin
139139
description: Paper Test Plugin
140-
api-version: '%%_MAJ_MC_%%'
140+
api-version: '%%_MAJ_MIN_PAT_MC_%%'
141141
bootstrapper: io.papermc.testplugin.TestPluginBootstrap
142142
loader: io.papermc.testplugin.TestPluginLoader
143143
```
144144
</VersionFormattedCode>
145145

146146
// The possible placeholders are:
147-
%%_MAJ_MC_%% - Major Paper Version (E.g. 1.20)
148-
%%_MAJ_MIN_MC_%% - Major-Minor Paper Version (E.g. 1.20.4)
149-
%%_MAJ_VEL_%% - Major Velocity Version (E.g. 3.3)
150-
%%_MAJ_MIN_VEL_%% - Major-Minor Velocity Version (E.g. 3.3.0)
147+
%%_MAJ_MIN_MC_%% - Major-Minor Paper Version (E.g. 1.20)
148+
%%_MAJ_MIN_PAT_MC_%% - Major-Minor-Patch Paper Version (E.g. 1.20.4)
149+
%%_MAJ_MIN_VEL_%% - Major Velocity Version (E.g. 3.1.0)
150+
%%_MAJ_MIN_PAT_VEL_%% - Major-Minor-Patch Velocity Version (E.g. 3.1.1-SNAPSHOT)
151151
````
152152

153153
When the major version of the software changes, the docs will still need to have a "snapshot" created to keep documentation

config-specs/paper/spigot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ messages:
6565
than the client version.
6666
6767
The message is formatted with legacy "&" style formatting, and "\\n" for
68-
newlines. Additionally, it replaces {0} with "%%_MAJ_MIN_MC_%%" (the current server
68+
newlines. Additionally, it replaces {0} with "%%_MAJ_MIN_PAT_MC_%%" (the current server
6969
version)
7070
outdated-server:
7171
default: "Outdated server! I'm still on {0}"
@@ -74,7 +74,7 @@ messages:
7474
than the client version.
7575
7676
The message is formatted with legacy "&" style formatting, and "\\n" for
77-
newlines. Additionally, it replaces {0} with "%%_MAJ_MIN_MC_%%" (the current server
77+
newlines. Additionally, it replaces {0} with "%%_MAJ_MIN_PAT_MC_%%" (the current server
7878
version)
7979
restart:
8080
default: Server is restarting

docs/misc/downloads-api.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ This will get the latest available Minecraft version for the given project.
4242
#!/usr/bin/env sh
4343
4444
PROJECT="paper"
45-
MINECRAFT_VERSION="%%_MAJ_MIN_MC_%%"
45+
MINECRAFT_VERSION="%%_MAJ_MIN_PAT_MC_%%"
4646
4747
LATEST_BUILD=$(curl -s https://api.papermc.io/v2/projects/${PROJECT}/versions/${MINECRAFT_VERSION}/builds | \
4848
jq '.builds | map(select(.channel == "default") | .build) | .[-1]')
@@ -64,7 +64,7 @@ This will get the latest stable build for the given project and Minecraft versio
6464
#!/usr/bin/env sh
6565
6666
PROJECT="paper"
67-
MINECRAFT_VERSION="%%_MAJ_MIN_MC_%%"
67+
MINECRAFT_VERSION="%%_MAJ_MIN_PAT_MC_%%"
6868
6969
LATEST_BUILD=$(curl -s https://api.papermc.io/v2/projects/${PROJECT}/versions/${MINECRAFT_VERSION}/builds | \
7070
jq -r '.builds | map(select(.channel == "default") | .build) | .[-1]')

docs/paper/dev/getting-started/paper-plugins.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ name: Paper-Test-Plugin
3131
version: '1.0'
3232
main: io.papermc.testplugin.TestPlugin
3333
description: Paper Test Plugin
34-
api-version: '%%_MAJ_MC_%%'
34+
api-version: '%%_MAJ_MIN_PAT_MC_%%'
3535
bootstrapper: io.papermc.testplugin.TestPluginBootstrap
3636
loader: io.papermc.testplugin.TestPluginLoader
3737
```

docs/paper/dev/getting-started/plugin-yml.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ main: io.papermc.testplugin.ExamplePlugin
3333
description: An example plugin
3434
author: PaperMC
3535
website: https://papermc.io
36-
api-version: '%%_MAJ_MC_%%'
36+
api-version: '%%_MAJ_MIN_PAT_MC_%%'
3737
```
3838
</VersionFormattedCode>
3939

@@ -92,8 +92,8 @@ This will be shown in the plugin info commands.
9292

9393
The version of the Paper API that your plugin is using. This doesn't include the minor version.
9494
Servers with a version lower than the version specified here will refuse to load the plugin.
95-
The valid versions are 1.13 - <SoftwareVersion versionType={"maj-min"}/>.
96-
- <VersionFormattedCode>`api-version: '%%_MAJ_MIN_MC_%%'`</VersionFormattedCode>
95+
The valid versions are 1.13 - <SoftwareVersion versionType={"maj-min-pat"}/>.
96+
- <VersionFormattedCode>`api-version: '%%_MAJ_MIN_PAT_MC_%%'`</VersionFormattedCode>
9797

9898
:::info
9999

docs/paper/dev/getting-started/project-setup.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ repositories {
3737
}
3838
3939
dependencies {
40-
compileOnly("io.papermc.paper:paper-api:%%_MAJ_MIN_MC_%%-R0.1-SNAPSHOT")
40+
compileOnly("io.papermc.paper:paper-api:%%_MAJ_MIN_PAT_MC_%%-R0.1-SNAPSHOT")
4141
}
4242
4343
java {

docs/paper/dev/getting-started/userdev.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ file.
7373
```
7474
dependencies {
7575
// Other Dependencies
76-
paperweight.paperDevBundle("%%_MAJ_MIN_MC_%%-R0.1-SNAPSHOT")
76+
paperweight.paperDevBundle("%%_MAJ_MIN_PAT_MC_%%-R0.1-SNAPSHOT")
7777
}
7878
```
7979
</VersionFormattedCode>

docs/paper/dev/misc/debugging.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ These will go after the `java` command and before `-jar`. Once you have done thi
4949

5050
<VersionFormattedCode language={"bash"}>
5151
```
52-
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar paper-%%_MAJ_MIN_MC_%%.jar nogui
52+
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005 -jar paper-%%_MAJ_MIN_PAT_MC_%%.jar nogui
5353
```
5454
</VersionFormattedCode>
5555

docs/paper/dev/misc/internal-code.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,10 @@ with one of the following methods:
8282

8383
<VersionFormattedCode language={"java"}>
8484
```
85-
// Example value: %%_MAJ_MIN_MC_%%
85+
// Example value: %%_MAJ_MIN_PAT_MC_%%
8686
String minecraftVersion = Bukkit.getServer().getMinecraftVersion();
8787
88-
// Example value: %%_MAJ_MIN_MC_%%-R0.1-SNAPSHOT
88+
// Example value: %%_MAJ_MIN_PAT_MC_%%-R0.1-SNAPSHOT
8989
String bukkitVersion = Bukkit.getServer().getBukkitVersion();
9090
9191
// Example value for 1.20.1: 3465

docs/velocity/admin/reference/server-compatibility.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ we can.
1111

1212
## Compatible game versions
1313

14-
As of this writing, Velocity is compatible with Minecraft 1.7.2 through <SoftwareVersion versionType={"max"}/>.
14+
As of this writing, Velocity is compatible with Minecraft 1.7.2 through <SoftwareVersion/>.
1515

1616
## Vanilla setups
1717

0 commit comments

Comments
 (0)