Skip to content

Commit a1aa2b6

Browse files
committed
1.21: the CI fixes
1 parent d93219b commit a1aa2b6

File tree

4 files changed

+34
-13
lines changed

4 files changed

+34
-13
lines changed

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ jobs:
2929
- name: Calculate artifact names
3030
id: calculate_artifact_names
3131
run: |
32-
MC=$(awk -F '=' '/mc_version/ { print $2; }' gradle.properties)
33-
BUILD=$(awk -F '=' '/build_number/ { print $2; }' gradle.properties)
32+
MC=$(awk -F '=' '/minecraft_version/ { print $2; }' gradle.properties)
33+
BUILD=$(awk -F '=' '/mod_version/ { print $2; }' gradle.properties)
3434
echo "forge=build/libs/Psi-${MC}-${BUILD}.jar" >> "$GITHUB_OUTPUT"
3535
3636
- name: Lint files

build.gradle

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,32 @@ tasks.withType(ProcessResources).configureEach {
119119
filesMatching(['META-INF/neoforge.mods.toml']) {
120120
expand replaceProperties
121121
}
122+
123+
from(sourceSets.main.resources.srcDirs) {
124+
exclude '**/psd/**'
125+
duplicatesStrategy 'include'
126+
}
127+
}
128+
129+
jar {
130+
archiveFileName = "${mod_name}-${minecraft_version}-${mod_version}.jar"
131+
132+
manifest {
133+
attributes([
134+
"Specification-Title": "${mod_id}",
135+
"Specification-Vendor": "vazkii",
136+
"Specification-Version": "1",
137+
"Implementation-Title": "${mod_id}",
138+
"Implementation-Version": "${mod_version}",
139+
"Implementation-Vendor" :"vazkii",
140+
"Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"),
141+
"MixinConfigs": "psi.mixins.json"
142+
])
143+
}
122144
}
123145

124146

147+
125148
tasks.withType(JavaCompile).configureEach {
126149
options.encoding = 'UTF-8'
127150
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ patchouli_version=1.21-87
1919
mod_id=psi
2020
mod_name=Psi
2121
mod_license=Psi License
22-
mod_version=1.21.1
22+
mod_version=103
2323
mod_group_id=vazkii.psi
2424
mod_authors=Vazkii, Wiiv, WireSegal, Kamefrede, Williewillus, Hubry, Dudblockman, TheidenHD
2525
mod_description=Psionic Spellcasting Instruments

scripts/push_tag.py

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ def main():
88
with open("gradle.properties", "rb") as f:
99
build.load(f, "utf-8")
1010

11-
mc_version, mcv_meta = build["mc_version"]
12-
version, v_meta = build["version"]
13-
build_number, bn_meta = build["build_number"]
11+
mc_version, mcv_meta = build["minecraft_version"]
12+
version, v_meta = build["mod_version"]
1413

1514
print("MC Version:", mc_version)
1615
print("Version:", version)
17-
print("Build Number", build_number)
1816

1917
changelog = ""
2018
with open("./web/changelog.txt", "r") as f:
@@ -24,11 +22,11 @@ def main():
2422
for line in lines[1:]:
2523
if not line.startswith("*"):
2624
break
27-
changelog = changelog + '-m "' + line + '" '
25+
changelog = changelog + '-m "' + line + '\n" '
2826

2927
tag_success = os.system(
30-
"git tag -a release-{}-{}-{} {}".format(
31-
mc_version, version, build_number, changelog
28+
"git tag -a release-{}-{} {}".format(
29+
mc_version, version, changelog
3230
)
3331
)
3432

@@ -38,14 +36,14 @@ def main():
3836
else:
3937
print("Created tag")
4038

41-
build["build_number"] = str(int(build_number) + 1)
39+
build["mod_version"] = str(int(mod_version) + 1)
4240
with open("gradle.properties", "wb") as f:
4341
build.store(f, encoding="utf-8")
4442

4543
os.system("git commit -a -m build")
4644
os.system(
47-
"git push origin master release-{}-{}-{}".format(
48-
mc_version, version, build_number
45+
"git push origin master release-{}-{}".format(
46+
mc_version, version
4947
)
5048
)
5149

0 commit comments

Comments
 (0)