electrodynamics/jenkinsBuildScript.txt
2013-04-10 03:55:24 -04:00

37 lines
No EOL
1.1 KiB
Bash

#!/bin/sh -e
MCP="${JENKINS_HOME}/workspace/Minecraft Forge/forge/mcp/"
MODVERSION="`head -n 1 modversion.txt`"
MCVERSION="`head -n 1 mcversion.txt`"
FILE_NAME="Fluid_Mechanics_v${MODVERSION}.${BUILD_NUMBER}.jar"
API_NAME="Hydraulics_API_v${MODVERSION}.${BUILD_NUMBER}.zip"
echo "Building ${JOB_NAME} version ${MODVERSION} build ${BUILD_NUMBER}"
echo "Getting pre build MCP"
cp -rf "${MCP}"* .
echo "Recompile"
./recompile.sh
echo "Reobfuscate_srg"
./reobfuscate_srg.sh
# create this ahead of time...
mkdir output
echo "Making ${API_NAME}"
cd src
zip -r9q "${WORKSPACE}/output/${API_NAME}" minecraft/hydraulic/*
cd ..
echo "Making ${FILE_NAME}"
jar cf "output/${FILE_NAME}" -C reobf/minecraft/ ./fluidmech
jar uf "output/${FILE_NAME}" -C reobf/minecraft/ ./hydraulic
jar uf "output/${FILE_NAME}" -C reobf/minecraft/ ./org
jar uf "output/${FILE_NAME}" -C reobf/minecraft/ ./universalelectricity
jar uf "output/${FILE_NAME}" -C resources/ ./mods/fluidmech
echo "Done."
echo "Appending to info file"
echo "@ ${BUILD_NUMBER} ${MCVERSION} ${FILE_NAME} ${API_NAME}" >> "${JENKINS_HOME}/jobs/${JOB_NAME}/info.txt"