echo "$tag)"
fi
-DIR="$tag"
+# Tags are marked as aquarium-*
+if [[ "$tag" =~ "aquarium-" ]];
+then
+ DIR=$tag
+else
+ DIR="aquarium-$tag"
+fi
# Creating dist dirs
mkdir -p $DIR
cp target/dependency/*.jar $DIR/lib || fail "copying dependencies"
echo "Copying Aquarium classes"
-cp target/$tag.jar $DIR/lib || fail "copying $tag.jar"
+aquariumjar=`find target -type f|egrep "aquarium-[0-9\.]+(-SNAPSHOT)?\.jar"`
+cp $aquariumjar $DIR/lib || fail "copying $aquariumjar"
echo "Copying scripts and config files"
-cp aquarium.sh $DIR/bin || fail "copying aquarium.sh"
+cp dist/aquarium.sh $DIR/bin || fail "copying aquarium.sh"
+cp dist/log4j.properties $DIR/conf|| fail "copying log4j.properties"
+cp dist/aquarium.properties $DIR/conf || fail "copying aquarium.properties"
+cp dist/policy.yaml $DIR/conf || fail "copying policy.yaml"
echo "Creating archive"
-tar zcvf $tag.tar.gz $DIR >> build.log 2>&1 || fail "creating archive"
+tar zcvf $DIR.tar.gz $DIR >> build.log 2>&1 || fail "creating archive"
echo "Cleaning up"
rm -Rf $DIR
rm $LOG
echo "File $tag.tar.gz created succesfully"
+
# vim: set sta sts=4 shiftwidth=4 sw=4 et ai :