From 313dab26a2b9d7f6fd3875e5666f9d5e3414d57b Mon Sep 17 00:00:00 2001 From: Franzz Date: Wed, 27 May 2026 17:59:58 +0200 Subject: [PATCH] Fix dev composer and update cron script --- .gitignore | 3 ++- cli/cron.sh | 5 +++-- composer.dev.json | 28 ++++++++++++++++++++++++++++ readme.md | 10 ++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) mode change 100644 => 100755 cli/cron.sh create mode 100644 composer.dev.json diff --git a/.gitignore b/.gitignore index 79f9cd1..c7d3327 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ /geo/ /node_modules/ /log.html -/dist/ \ No newline at end of file +/dist/ +/composer.dev.lock diff --git a/cli/cron.sh b/cli/cron.sh old mode 100644 new mode 100755 index 054fa99..ac14535 --- a/cli/cron.sh +++ b/cli/cron.sh @@ -1,4 +1,5 @@ #!/bin/bash -wget -qO- https://spot.lutran.fr/index.php?a=update_project > /dev/null +cd "$(dirname "$0")/.." || exit 1 +php -f dist/index.php a=update_project > /dev/null -#Crontab job: 0 * * * * . /var/www/spot/spot_cron.sh > /dev/null \ No newline at end of file +#Crontab job: 0 * * * * /path/to/spot/cli/cron.sh > /dev/null diff --git a/composer.dev.json b/composer.dev.json new file mode 100644 index 0000000..0c50424 --- /dev/null +++ b/composer.dev.json @@ -0,0 +1,28 @@ +{ + "name": "franzz/spot", + "description": "LiveTrail", + "type": "project", + "license": "GPL-3.0-or-later", + "repositories": [ + { + "type": "path", + "url": "../objects", + "options": { + "symlink": true + } + } + ], + "require": { + "franzz/objects": "dev-vue", + "phpmailer/phpmailer": "^7.1" + }, + "autoload": { + "psr-4": { + "Franzz\\Spot\\": "lib/", + "Franzz\\Objects\\": "../objects/inc/" + }, + "files": [ + "config/settings.php" + ] + } +} diff --git a/readme.md b/readme.md index 56a3fda..7214967 100644 --- a/readme.md +++ b/readme.md @@ -34,6 +34,16 @@ 8. Go to #admin and create a new project, feed & maps 9. Add a GPX file named .gpx to /geo/ +## Local Development + +When developing Spot and the sibling `objects` library together, install dependencies through the local Composer manifest: + +```bash +COMPOSER=composer.dev.json composer update +``` + +This makes Composer link `vendor/franzz/objects` to `../objects` and autoload that namespace directly from the local source path. Production continues to use `composer.json`, which installs `franzz/objects` from its Git repository. Commit and publish `objects` changes before updating/deploying a Spot version that relies on them. + ## To Do List * Add mail frequency slider