Add prefix to published version

This commit is contained in:
Nassim Jahnke 2024-05-12 12:50:27 +02:00
parent 29d2ceab78
commit bdc89dd763
No known key found for this signature in database
GPG Key ID: EF6771C01F6EF02F
3 changed files with 7 additions and 5 deletions

View File

@ -26,7 +26,7 @@ jobs:
- name: Setup Python
if: steps.check_changes.outputs.changes == 'y'
uses: actions/setup-python@v4
uses: actions/setup-python@v5
- name: Update and patch mcstructs
if: steps.check_changes.outputs.changes == 'y'
@ -36,7 +36,7 @@ jobs:
- name: Setup Java JDK
if: steps.check_changes.outputs.changes == 'y'
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17

View File

@ -16,7 +16,7 @@ jobs:
run: git submodule update --init
- name: Setup Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
- name: Update and patch mcstructs
run: |
@ -24,7 +24,7 @@ jobs:
python mcstructs.py
- name: Setup Java JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17

View File

@ -2,7 +2,8 @@ import os
import re
import subprocess
via_nbt_version = '5.0.0'
via_nbt_version = '5.0.0-SNAPSHOT'
version_prefix = '5'
# All of this would work better with bytecode rewriting, but here we go
replacements = {
@ -11,6 +12,7 @@ replacements = {
'url = "https://maven.lenni0451.net/everything"': 'url = "https://repo.viaversion.com/"',
'api project(":MCStructs-nbt")': f'api "com.viaversion:nbt:{via_nbt_version}"',
'maven_group=net.lenni0451.mcstructs': 'maven_group=com.viaversion.mcstructs',
'maven_version=': f'maven_version={version_prefix}-',
# Code changes
'import net.lenni0451.mcstructs.nbt.tags.': 'import com.viaversion.nbt.tag.',
'import net.lenni0451.mcstructs.nbt.': 'import com.viaversion.nbt.tag.',