Major changes from LibrePlan upstream: Migration to Java 21 / Tomcat 9: - ZK Framework 9.x → 8.6.0.1 (built-in databinding) - Removed stub classes blocking real ZK databinder - BCrypt password fix (matches() vs equals()) - Spring Security firewall for double-slash URLs - I18nHelper _() → tr() (Java 9+ reserved keyword) - Hibernate TypeContributor for Jadira types - Fixed ConfigurationModel Currency locale handling Rebrand to TASKPM: - Maven project names updated - web.xml display-name → taskpm-webapp - CSS files: libreplan.css → taskpm.css - i18n .po files updated (all locales) - ZUL page titles updated - Documentation rebranded New Features: - PERT Chart prototype using vis.js (/planner/pert/) - New doc chapters: 22-taskpm.rst (PERT focus) - Deploy automation scripts (migrate/) - Help docs deployed to webapp Removed: - Original .forgejo and .github CI workflows (will be replaced) TASKPM is a personal-oriented planning package integrating taskwarrior/timewarrior with PERT/CPM Monte Carlo scheduling. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
51 lines
1.8 KiB
Bash
Executable file
51 lines
1.8 KiB
Bash
Executable file
#!/bin/bash
|
|
# LibrePlan deployment cycle script for Tomcat 9
|
|
# Usage: ./tryagain [seconds_to_wait]
|
|
|
|
WAIT_SECS=${1:-15}
|
|
|
|
echo "=== Cycle 1/6: Stopping Tomcat ==="
|
|
sudo systemctl stop tomcat9
|
|
|
|
echo "=== Cycle 2/6: Removing old deployment ==="
|
|
sudo rm -rf /opt/tomcat/webapps/libreplan*
|
|
|
|
echo "=== Cycle 3/6: Deploying new WAR ==="
|
|
sudo cp /space/work/pkgs/libreplan/libreplan-webapp/target/libreplan-webapp.war /opt/tomcat/webapps/libreplan.war
|
|
|
|
echo "=== Cycle 4/6: Clearing old logs ==="
|
|
sudo truncate -s 0 /opt/tomcat/logs/catalina.out
|
|
sudo rm -f /opt/tomcat/logs/localhost.*.log
|
|
|
|
echo "=== Cycle 5/6: Starting Tomcat ==="
|
|
sudo systemctl start tomcat9
|
|
|
|
echo "=== Cycle 6/6: Waiting ${WAIT_SECS}s for deployment ==="
|
|
for i in $(seq 1 $WAIT_SECS); do
|
|
echo -ne "\r $i / $WAIT_SECS seconds..."
|
|
sleep 1
|
|
done
|
|
echo ""
|
|
|
|
echo "=== Copying logs ==="
|
|
sudo cp /opt/tomcat/logs/catalina.out /space/work/pkgs/libreplan/migrate/catalina.out
|
|
sudo chmod 644 /space/work/pkgs/libreplan/migrate/catalina.out
|
|
|
|
LOCALHOST_LOG=$(ls -t /opt/tomcat/logs/localhost.*.log 2>/dev/null | head -1)
|
|
if [ -n "$LOCALHOST_LOG" ]; then
|
|
sudo cp "$LOCALHOST_LOG" /space/work/pkgs/libreplan/migrate/localhost.log
|
|
sudo chmod 644 /space/work/pkgs/libreplan/migrate/localhost.log
|
|
fi
|
|
|
|
echo ""
|
|
echo "=== Result ==="
|
|
if grep -q "Server startup in" /space/work/pkgs/libreplan/migrate/catalina.out; then
|
|
echo "SUCCESS: Tomcat started"
|
|
grep "Server startup in" /space/work/pkgs/libreplan/migrate/catalina.out
|
|
elif grep -q "startup failed" /space/work/pkgs/libreplan/migrate/catalina.out; then
|
|
echo "FAILED: Deployment failed"
|
|
grep -i "exception\|error\|caused by" /space/work/pkgs/libreplan/migrate/localhost.log 2>/dev/null | head -5
|
|
else
|
|
echo "IN PROGRESS: Still deploying..."
|
|
tail -3 /space/work/pkgs/libreplan/migrate/catalina.out
|
|
fi
|