summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Heher <jakob.heher@iaik.tugraz.at>2022-05-02 18:28:48 +0200
committerJakob Heher <jakob.heher@iaik.tugraz.at>2022-05-02 18:28:48 +0200
commit43ef19beffc485619f55fe9b44a1a9743d35c397 (patch)
tree0cf6f8c8bd7e3319c2d8420199b9e458e287cf60
parentf9e9a876186ba7d75adc0bd3a1d31a4a9b570cfc (diff)
downloadpdf-over-43ef19beffc485619f55fe9b44a1a9743d35c397.tar.gz
pdf-over-43ef19beffc485619f55fe9b44a1a9743d35c397.tar.bz2
pdf-over-43ef19beffc485619f55fe9b44a1a9743d35c397.zip
get rid of all the unused parts of publish.sh
-rwxr-xr-xpublish.sh76
1 files changed, 6 insertions, 70 deletions
diff --git a/publish.sh b/publish.sh
index e2ac154c..892d330f 100755
--- a/publish.sh
+++ b/publish.sh
@@ -3,16 +3,10 @@
#### CONFIGURE: ######
PUBLISH_DIR="pdf-over-build"
LOG_DIR="/tmp/pdfover_log"
-CODEBASE_URL="http:\/\/abyss.iaik.tugraz.at\/pdf-over\/"
-CONTEXT_URL="http:\/\/abyss.iaik.tugraz.at\/pdf-over\/"
-HOMEPAGE_URL="http:\/\/www.buergerkarte.at"
-RELEASE_FILE="Release.txt"
#### DON'T CONFIGURE ####
BASEDIR="`dirname $0`"
-VERSION=`grep -m1 "<version>" "$BASEDIR/pom.xml" | sed -e "s/[ \t]*<version>\(.*\)<\/version>/\1/"`
-
TBOLDGRAY="\033[1;30m"
TGREEN="\033[0;32m"
TBOLDGREEN="\033[1;32m"
@@ -49,7 +43,7 @@ mkdir -p "$PUBLISH_DIR"
mkdir -p "$LOG_DIR"
begin_phase "Cleaning..."
-mvn clean > "$LOG_DIR/clean.log" 2>&1
+mvn -B clean > "$LOG_DIR/clean.log" 2>&1
RETVAL=$?
if [ $RETVAL -eq 0 ]; then
end_phase "OK"
@@ -58,82 +52,24 @@ else
fi
profiles=( linux windows mac mac-aarch64 )
-names=( linux windows mac mac-aarch64 )
if [[ "$1" != "" ]] && [[ "$1" == "--profiles" ]]; then
profiles=( $2 )
- names=( $2 )
shift
shift
MVN_PARAMS="$@"
fi
-for (( i = 0 ; i < ${#names[@]} ; i++ )) do
+pids=()
+for (( i = 0 ; i < ${#profiles[@]} ; i++ )) do
PROFILE=${profiles[$i]}
- NAME=${names[$i]}
- INSTALLER=setup_pdf-over_$NAME.jar
- begin_phase "Building package [$PROFILE] as $INSTALLER..."
- mvn install -P$PROFILE -Dno-native-profile $MVN_PARAMS > "$LOG_DIR/build_$NAME.log" 2>&1
+ begin_phase "Building profile [$PROFILE]..."
+ mvn -B install -P$PROFILE -Dno-native-profile $MVN_PARAMS > "$LOG_DIR/build_$NAME.log" 2>&1
RETVAL=$?
- if [ $RETVAL -eq 0 ]; then
+ if [ ${RETVAL} -eq 0 ]; then
end_phase "OK"
else
end_phase "FAILED"
- continue
fi
done
-begin_phase "Building JNLP..."
-cp ./pdf-over-gui/src/main/jnlp/pdf-over.jnlp "$PUBLISH_DIR/pdf-over.jnlp"
-RETVAL=$?
-if [ $RETVAL -ne 0 ]; then
- end_phase "FAILED"
-else
- sed -i "s/##CODEBASE_URL##/$CODEBASE_URL/g" "$PUBLISH_DIR/pdf-over.jnlp"
- RETVAL=$?
- if [ $RETVAL -ne 0 ]; then
- end_phase "FAILED"
- else
- sed -i "s/##CONTEXT_URL##/$CONTEXT_URL/g" "$PUBLISH_DIR/pdf-over.jnlp"
- RETVAL=$?
- if [ $RETVAL -ne 0 ]; then
- end_phase "FAILED"
- else
- sed -i "s/##HOMEPAGE_URL##/$HOMEPAGE_URL/g" "$PUBLISH_DIR/pdf-over.jnlp"
- RETVAL=$?
- if [ $RETVAL -ne 0 ]; then
- end_phase "FAILED"
- else
- end_phase "OK"
- fi
- fi
- fi
-fi
-
-begin_phase "Creating Release.txt..."
-echo $VERSION > "$PUBLISH_DIR/$RELEASE_FILE"
-RETVAL=$?
-if [ $RETVAL -ne 0 ]; then
- end_phase "FAILED"
-else
- end_phase "OK"
-fi
-
-begin_phase "Copying images..."
-cp -r ./pdf-over-gui/src/main/resources/icons "$PUBLISH_DIR"
-RETVAL=$?
-if [ $RETVAL -ne 0 ]; then
- end_phase "FAILED"
-else
- end_phase "OK"
-fi
-
-begin_phase "Building javadoc..."
-mvn javadoc:aggregate > "$LOG_DIR/javadoc.log" 2>&1 && cp -r target/site/apidocs/ "$PUBLISH_DIR"
-RETVAL=$?
-if [ $RETVAL -ne 0 ]; then
- end_phase "FAILED"
-else
- end_phase "OK"
-fi
-
popd > /dev/null