Automated file editing for new production server deployments

This commit is contained in:
Marwolf
2018-08-11 00:50:39 -04:00
parent cf669014ba
commit 8bab4ca9e0
2 changed files with 26 additions and 43 deletions

View File

@@ -0,0 +1,26 @@
#!/bin/bash
# Pull
echo "Pulling updates from repositories."
sudo git pull
cd Game
sudo git pull
cd ..
cd Website
sudo git pull
cd ..
echo ""
echo ""
# Manual edits
echo "Manual java file edits are next. Press enter to begin."
read next
sudo nano Game/client/src/org/openrsc/client/Config.java
sudo nano Game/Launcher/src/Main.java
sudo nano Run_Production_Linux_Game_Server.sh
echo ""
echo ""
echo "Launching Run_Production_Linux_Game_Server.sh"
echo ""
echo ""
./Run_Production_Linux_Game_Server.sh

View File

@@ -1,43 +0,0 @@
#!/bin/bash
# Client
echo "Compiling the game client."
echo ""
sudo ant -f "Game/client/build.xml" compile
echo ""
echo ""
echo "Compressing jar into zip"
echo ""
cd Game/client
sudo zip -r "client.zip" "Open_RSC_Client.jar"
cd ../../
echo ""
echo ""
echo "Copying result to Website/downloads/"
echo ""
yes | sudo cp -rf "Game/client/client.zip" "Website/downloads/"
sudo rm "Game/client/client.zip"
echo ""
echo ""
# Launcher
echo "Compiling the game launcher."
echo ""
sudo ant -f "Game/Launcher/build.xml"
echo ""
echo ""
echo "Copying result to Website/downloads/"
echo ""
yes | sudo cp -rf "Game/Launcher/dist/Open_RSC_Launcher.jar" "Website/downloads/"
echo ""
echo ""
# Cache
echo "Copying Game/client/cache.zip to Website/downloads/"
yes | sudo cp -rf "Game/client/cache.zip" "Website/downloads/"
# MD5sum client.zip and cache.zip > hashes.txt
sudo rm Website/downloads/hashes.txt
md5sum Website/downloads/client.zip | grep ^[a-zA-Z0-9]* | awk '{print "client="$1}' | sudo tee -a Website/downloads/hashes.txt
md5sum Website/downloads/cache.zip | grep ^[a-zA-Z0-9]* | awk '{print "cache="$1}' | sudo tee -a Website/downloads/hashes.txt