forked from ForgeEssentials/ForgeEssentials
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
47 lines (36 loc) · 1.67 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
VERSION="0.1.0.${BUILD_NUMBER}"
MC="1.4.6"
echo "Downloading Forge..."
wget http://files.minecraftforge.net/minecraftforge/minecraftforge-src-latest.zip
unzip minecraftforge-src-*.zip
rm minecraftforge-src-*.zip
cd forge
echo "Installing Forge..."
bash ./install.sh
cd mcp
echo "Copying ${JOB_NAME} into MCP..."
cd src
cp -rf ${WORKSPACE}/src/FE_SRC_COMMON/* ./minecraft/
cp -rf ${WORKSPACE}/src/FE_SRC_CLIENT/* ./minecraft/
cd ..
echo "Adding in libraries..."
cd lib
cp -rf ${WORKSPACE}/lib/* .
cd ..
echo "Recompiling..."
bash ./recompile.sh
echo "Reobfuscating..."
bash ./reobfuscate.sh
echo "Copying in extra files"
cd reobf/minecraft
cp -rf ${WORKSPACE}/A1-zipStuff/* .
cp -rf ${WORKSPACE}/src/FE_SRC_COMMON/com/ForgeEssentials/util/lang/* ./com/ForgeEssentials/util/lang/
rm ./com/ForgeEssentials/util/lang/dummyForGithub
echo "injecting version into mcmod.info"
sed -i 's/@build@/'${BUILD_NUMBER}'/g' mcmod.info
echo "Creating distribution packages"
mkdir ${WORKSPACE}/output
jar cvfm "${WORKSPACE}/output/${JOB_NAME}-core-${MC}-${VERSION}.jar" ./META-INF/MANIFEST.MF ./com/ForgeEssentials/core/* ./com/ForgeEssentials/coremod/* ./com/ForgeEssentials/permission/* ./com/ForgeEssentials/util/* ./com/ForgeEssentials/data/* ./com/ForgeEssentials/client/core/* logo.png mcmod.info
zip -r9 "${WORKSPACE}/output/${JOB_NAME}-modules-${MC}-${VERSION}.zip" ./com/ForgeEssentials/client/CUI/* ./com/ForgeEssentials/chat/* ./com/ForgeEssentials/commands/* ./com/ForgeEssentials/economy/* ./com/ForgeEssentials/playerLogger/* ./com/ForgeEssentials/protection/* ./com/ForgeEssentials/WorldBorder/* ./com/ForgeEssentials/WorldControl/* ./com/ForgeEssentials/backup/*
cd ${WORKSPACE}/output
#upload