Skip to content

Commit

Permalink
👷 Updated build
Browse files Browse the repository at this point in the history
  • Loading branch information
Heroyt committed May 3, 2024
1 parent 97b0988 commit 0de77fb
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
branch = master
[submodule "modules/Core"]
path = modules/Core
url = https://github.com/LaserLiga/lac_modules_core.git
url = https://github.com/LaserLiga/lac_modules_core
branch = master
[submodule "modules/Tables"]
path = modules/Tables
Expand Down
10 changes: 2 additions & 8 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,14 @@ RUN mkdir -p lmx
RUN mkdir -p lmx/results
RUN mkdir -p lmx/games

RUN composer update
ENV COMPOSER_ALLOW_SUPERUSER=1

# Copy shell scripts
COPY start.sh start.sh
COPY startRR.sh startRR.sh

# Initialize crontab
RUN crontab -l | { cat; echo "* * * * * /usr/local/bin/php /var/www/bin/scheduler.php >> /var/www/logs/cron.log 2>&1"; } | crontab -

# Install
ENV COMPOSER_ALLOW_SUPERUSER=1
RUN composer dump-autoload
RUN npm install
RUN npm run build

RUN chmod 0777 -R logs
RUN chmod 0777 -R temp

Expand Down
34 changes: 31 additions & 3 deletions startRR.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,42 @@
# Update project
if [ "$LAC_VERSION" != "dev" ]; then
git fetch --all --tags
git checkout "v${LAC_VERSION}" -b "stable"
git -C src/GameModels fetch --all --tags
git -C src/GameModels checkout "v${LAC_MODELS_VERSION}" -b "stable"
if [ "$LAC_VERSION" == "stable" ]; then
git pull --recurse-submodules
else
git checkout "v${LAC_VERSION}" -b "stable"
git -C src/GameModels fetch --all --tags
git -C src/GameModels checkout "v${LAC_MODELS_VERSION}" -b "stable"
fi
php install.php
else
echo "Skipping git fetch for dev"
fi

if [ ! -f "composer.lock" ]; then
composer update
else
composer install
fi
compoer dump-autoload

if [ ! -f "package-lock.json" ]; then
npm update
else
npm install
fi

# Build assets
npm run build

# Prepare some tasks
./bin/console translations:compile
./bin/console regression:update

# Clear DI, model and info cache
./bin/console cache:clean -dmi


# Run project
echo 'Starting...'
echo $PWD
Expand Down

0 comments on commit 0de77fb

Please sign in to comment.