This commit is contained in:
Bane Stojkovic
2025-03-24 20:47:12 +01:00
parent b7d482cfcf
commit 3b987e2b16
2 changed files with 61 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/bin/bash
# Get the directory where this script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Set DEBUG environment variable
export DEBUG=true
# Build classpath from lib and library directories
CLASSPATH=""
for jar in "$SCRIPT_DIR/../lib"/*.jar "$SCRIPT_DIR/../library"/*.jar; do
if [ -f "$jar" ]; then
CLASSPATH="$CLASSPATH:$jar"
fi
done
# Remove leading colon
CLASSPATH="${CLASSPATH#:}"
# Run the VersionReader class
java -cp "$CLASSPATH" org.diylc.utils.VersionReader "$SCRIPT_DIR/../"
+40
View File
@@ -0,0 +1,40 @@
#!/bin/bash
# Get the directory where this script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# FTP settings
FTP_USER="diylc_deploy@diy-fever.com"
FTP_HOST="ftp.diy-fever.com"
# Check if password is set
if [ -z "$DIYLC_DEPLOY_PWD" ]; then
echo "Error: DIYLC_DEPLOY_PWD environment variable is not set"
exit 1
fi
# Source file path
SOURCE_FILE="$SCRIPT_DIR/../../diylc-core/src/main/resources/update.xml"
# Check if source file exists
if [ ! -f "$SOURCE_FILE" ]; then
echo "Error: update.xml not found at $SOURCE_FILE"
exit 1
fi
# Upload using FTP
echo "Uploading update.xml to $FTP_USER@$FTP_HOST..."
ftp -n "$FTP_HOST" << EOF
user $FTP_USER $DIYLC_DEPLOY_PWD
binary
put "$SOURCE_FILE" update.xml
quit
EOF
# Check FTP exit status
if [ $? -eq 0 ]; then
echo "Upload successful"
else
echo "Upload failed"
exit 1
fi