Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
CreatureChat
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
Public
CreatureChat
Commits
385b0f1e
Commit
385b0f1e
authored
Jun 17, 2025
by
Jonathan Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experimental build script extracted from Gitlab CI
parent
1b9699be
Pipeline
#13937
failed with stages
in 1 second
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
45 deletions
+41
-45
.gitlab-ci.yml
.gitlab-ci.yml
+1
-45
build.sh
build.sh
+40
-0
No files found.
.gitlab-ci.yml
View file @
385b0f1e
...
@@ -19,51 +19,7 @@ build_mod:
...
@@ -19,51 +19,7 @@ build_mod:
-
export PATH=$JAVA_HOME/bin:$PATH
-
export PATH=$JAVA_HOME/bin:$PATH
-
java -version
-
java -version
script
:
script
:
-
|
-
./build.sh
declare -a versions=("1.20" "1.20.1" "1.20.2" "1.20.3" "1.20.4")
declare -a mappings=("1.20+build.1" "1.20.1+build.10" "1.20.2+build.4" "1.20.3+build.1" "1.20.4+build.3")
declare -a fabric_versions=("0.83.0+1.20" "0.92.1+1.20.1" "0.91.6+1.20.2" "0.91.1+1.20.3" "0.97.0+1.20.4")
for i in "${!versions[@]}"; do
minecraft_version="${versions[$i]}"
yarn_mappings="${mappings[$i]}"
fabric_version="${fabric_versions[$i]}"
echo "****"
echo "Building for Minecraft Version $minecraft_version with Fabric $fabric_version\n"
echo "****"
# Replace versions before build attempt
sed -i "s/minecraft_version=.*/minecraft_version=$minecraft_version/" gradle.properties
sed -i "s/yarn_mappings=.*/yarn_mappings=$yarn_mappings/" gradle.properties
sed -i "s/loader_version=.*/loader_version=0.15.11/" gradle.properties
sed -i "s/fabric_version=.*/fabric_version=$fabric_version/" gradle.properties
echo "Contents of gradle.properties:"
cat gradle.properties
echo ""
# Update minecraft version dependency in fabric.mod.json
sed -i "s/\"minecraft\": \".*\"/\"minecraft\": \"~$minecraft_version\"/" src/main/resources/fabric.mod.json
echo "Contents of fabric.mod.json:"
cat src/main/resources/fabric.mod.json
echo ""
./gradlew build -x test
find build/libs -type f -name '*sources*.jar' -exec rm {} \;
mv build/libs/creaturechat-*.jar .
if [ "$minecraft_version" == "1.20.1" ]; then
jar_name=$(ls creaturechat-*+1.20.1.jar)
cp "$jar_name" "${jar_name%.jar}-forge.jar"
touch FORGE
zip -r "${jar_name%.jar}-forge.jar" FORGE
fi
FABRIC_API_JAR="fabric-api-${fabric_version}.jar"
DOWNLOAD_URL="https://github.com/FabricMC/fabric/releases/download/${fabric_version//+/%2B}/${FABRIC_API_JAR}"
wget -q -O "${FABRIC_API_JAR}" $DOWNLOAD_URL
ls . -la
done
artifacts
:
artifacts
:
paths
:
paths
:
-
creaturechat-*.jar
-
creaturechat-*.jar
...
...
build.sh
0 → 100644
View file @
385b0f1e
#!/bin/bash
set
-e
declare
-a
versions
=(
"1.20"
"1.20.1"
"1.20.2"
"1.20.3"
"1.20.4"
)
declare
-a
mappings
=(
"1.20+build.1"
"1.20.1+build.10"
"1.20.2+build.4"
"1.20.3+build.1"
"1.20.4+build.3"
)
declare
-a
fabric_versions
=(
"0.83.0+1.20"
"0.92.1+1.20.1"
"0.91.6+1.20.2"
"0.91.1+1.20.3"
"0.97.0+1.20.4"
)
for
i
in
"
${
!versions[@]
}
"
;
do
minecraft_version
=
"
${
versions
[
$i
]
}
"
yarn_mappings
=
"
${
mappings
[
$i
]
}
"
fabric_version
=
"
${
fabric_versions
[
$i
]
}
"
echo
"****"
echo
"Building for Minecraft Version
$minecraft_version
with Fabric
$fabric_version
"
echo
"****"
sed
-i
"s/^minecraft_version=.*/minecraft_version=
$minecraft_version
/"
gradle.properties
sed
-i
"s/^yarn_mappings=.*/yarn_mappings=
$yarn_mappings
/"
gradle.properties
sed
-i
"s/^loader_version=.*/loader_version=0.15.11/"
gradle.properties
sed
-i
"s/^fabric_version=.*/fabric_version=
$fabric_version
/"
gradle.properties
sed
-i
"s/
\"
minecraft
\"
:
\"
.*
\"
/
\"
minecraft
\"
:
\"
~
$minecraft_version
\"
/"
src/main/resources/fabric.mod.json
./gradlew build
-x
test
find build/libs
-type
f
-name
'*sources*.jar'
-exec
rm
{}
\;
mv build/libs/creaturechat-
*
.jar
.
if
[
"
$minecraft_version
"
==
"1.20.1"
]
;
then
jar_name
=
$(
ls
creaturechat-
*
+1.20.1.jar
)
cp
"
$jar_name
"
"
${
jar_name
%.jar
}
-forge.jar"
touch FORGE
zip
-r
"
${
jar_name
%.jar
}
-forge.jar"
FORGE
fi
FABRIC_API_JAR
=
"fabric-api-
${
fabric_version
}
.jar"
DOWNLOAD_URL
=
"https://github.com/FabricMC/fabric/releases/download/
${
fabric_version
//+/%2B
}
/
${
FABRIC_API_JAR
}
"
wget
-q
-O
"
${
FABRIC_API_JAR
}
"
$DOWNLOAD_URL
echo
""
done
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment