Created
June 21, 2016 10:41
-
-
Save jirikrepl/0505f53b5c96e23808bbb0aacfdce0e0 to your computer and use it in GitHub Desktop.
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 -e | |
function restore_saved_artifacts() { | |
if [ "$(ls -A /tmp/artifacts/ 2>/dev/null)" ]; then | |
echo "Restoring saved artifacts from prior build..." | |
mv /tmp/artifacts/.[!.]* $HOME/. | |
fi | |
} | |
# Source code provided to S2I is at ${HOME} | |
if [[ "$1" == "-h" ]]; then | |
exec /usr/libexec/s2i/usage | |
fi | |
export GRADLE_USER_HOME=${HOME}/.gradle | |
LOCAL_SOURCE_DIR=/tmp/src | |
DEPLOY_DIR=$CATALINA_HOME/webapps/ | |
restore_saved_artifacts | |
pushd $LOCAL_SOURCE_DIR &> /dev/null | |
cp -r resources/xml/ $HOME/.meditor/ | |
mvn com.isomorphic:isc-maven-plugin:install -Dproduct=SMARTGWT -Dlicense=LGPL -DbuildNumber=5.0p -DbuildDate=2015-11-29 | |
mvn clean install -Pdev | |
mv ./target/meditor.war $DEPLOY_DIR | |
unzip -o resources/djatoka/dist/djatoka.war -d $CATALINA_HOME/webapps/djatoka | |
cp resources/djatoka/bin/log4j.properties $CATALINA_HOME/webapps/djatoka/WEB-INF/classes/log4j.properties | |
cp resources/djatoka/bin/djatoka.properties $CATALINA_HOME/webapps/djatoka/WEB-INF/classes/djatoka.properties | |
chmod -R g+w $CATALINA_HOME/webapps/djatoka/WEB-INF/classes | |
mv resources/djatoka/ $HOME/.meditor/ | |
mv resources/convertAudio/ $HOME/.meditor/ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment