Last active
August 29, 2015 14:09
-
-
Save Afforess/6ed2ef61314651d867f1 to your computer and use it in GitHub Desktop.
assembly-deploy.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WORKING_DIR="/home/afforess/workspace/NationStatesPlusPlus/Assembly" | |
BUILD_DIR="/home/afforess/workspace/Assembly-dist" | |
GIT_USER="Afforess" | |
GIT_EMAIL="[email protected]" | |
echo "WORKING_DIR: $WORKING_DIR" | |
echo "BUILD_DIR: $BUILD_DIR" | |
sleep 3 | |
cd "$WORKING_DIR" | |
#run build | |
activator dist | |
sleep 10 | |
cd ./target/universal | |
rm -r assembly-1.0-SNAPSHOT | |
unzip assembly-1.0-SNAPSHOT.zip | |
#switch to master | |
cd "$BUILD_DIR" | |
git checkout master | |
#setup git | |
git config user.name "$GIT_USER" | |
git config user.email "$GIT_EMAIL" | |
#wipe old jars | |
cd "$BUILD_DIR/lib" | |
rm ./*.jar | |
#copy new libs | |
cd "$WORKING_DIR/target/universal/assembly-1.0-SNAPSHOT/lib" | |
cp *.jar "$BUILD_DIR/lib" | |
#copy new start script | |
cp "$WORKING_DIR/target/universal/assembly-1.0-SNAPSHOT/bin/assembly" "$BUILD_DIR/bin/assembly" | |
#copy config | |
cp "$WORKING_DIR/conf/application-logger.xml" "$BUILD_DIR/conf/application-logger.xml" | |
cp "$WORKING_DIR/conf/application.conf" "$BUILD_DIR/conf/application.conf" | |
cd "$BUILD_DIR" | |
git add -A . | |
git commit -m "update assembly" | |
git push [email protected]:Afforess/Assembly-dist.git master | |
echo "Commited to Master" | |
#switch to client | |
cd "$BUILD_DIR" | |
git checkout client | |
#wipe old jars | |
cd "$BUILD_DIR/lib" | |
rm ./*.jar | |
#copy new libs | |
cd "$WORKING_DIR/target/universal/assembly-1.0-SNAPSHOT/lib" | |
cp *.jar "$BUILD_DIR/lib" | |
#copy config | |
cp "$WORKING_DIR/conf/application-logger.xml" "$BUILD_DIR/conf/application-logger.xml" | |
cp "$WORKING_DIR/conf/application.conf" "$BUILD_DIR/conf/application.conf" | |
#copy new start script | |
cp "$WORKING_DIR/target/universal/assembly-1.0-SNAPSHOT/bin/assembly" "$BUILD_DIR/bin/assembly" | |
cd "$BUILD_DIR/lib" | |
git add -A . | |
git commit -m "update assembly" | |
git push [email protected]:Afforess/Assembly-dist.git client | |
echo "Commited to Client" | |
echo "done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment