Commit e601d246 authored by Philip Makedonski's avatar Philip Makedonski
Browse files

+ added package assembly script, #35

parent 45fa9c62
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
#!/bin/bash

BASE_DIR=$(dirname "$0")
PARENT=$(dirname "$BASE_DIR")
# echo "Base: $BASE_DIR"
# echo "Parent: $PARENT"

# get version
VERSION=$(grep -m 1 "<profileVersion>" $BASE_DIR/t3q.xml | cut -d '>' -f 2 | cut -d '<' -f 1)
echo "Version: $VERSION"

TARGET=downloads/t3q-$VERSION
mkdir -p $TARGET

# assemble contents
cp $BASE_DIR/t3q.xml $TARGET/
cp $BASE_DIR/t3q.bat $TARGET/
cp $BASE_DIR/t3q $TARGET/
cp $PARENT/target/de.ugoe.cs.swe.T3Q-1.0.0-SNAPSHOT-shadow.jar $TARGET/t3q.jar

# zip contents of target directory without parent path
cd downloads
zip -r t3q-$VERSION.zip t3q-$VERSION/

# clean up
rm -rf t3q-$VERSION/
cd ..