Skip to content

Commit

Permalink
Merge branch 'develop' into fix/11660
Browse files Browse the repository at this point in the history
  • Loading branch information
aembler authored Oct 13, 2023
2 parents 6d864fe + e0cdc21 commit 0b78b1a
Show file tree
Hide file tree
Showing 104 changed files with 2,513 additions and 937 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/build-assets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Build assets

on:
pull_request:
push:

jobs:
build-assets:
strategy:
matrix:
include:
- os: ubuntu-latest
nodejs-version: 18
# Just one case may have this set to yes
update-repo: yes
name: Build assets (node ${{ matrix.nodejs-version }} on ${{ matrix.os }})
runs-on: ${{ matrix.os }}
steps:
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.nodejs-version }}

- name: Checkout
uses: actions/checkout@v3
- name: Install NodeJS dependencies
run: |
cd "${{ github.workspace }}/build"
npm ci
- name: Build assets (dev)
run: |
cd "${{ github.workspace }}/build"
npm run-script dev
- name: Tell git to ignore the built files
run: |
cd "${{ github.workspace }}/build"
npm run-script git-skip
- name: Check that git thinks the repo is clean
run: |
cd "${{ github.workspace }}"
git diff --exit-code --name-status
- name: Revert changed files
run: |
cd "${{ github.workspace }}/build"
npm run-script git-revert
- name: Check that git thinks the repo is clean
run: |
cd "${{ github.workspace }}"
git diff --exit-code --name-status
- name: Build assets (prod)
run: |
cd "${{ github.workspace }}/build"
npm run-script prod
- name: Update repository
if: matrix.update-repo == 'yes'
run: |
cd '${{ github.workspace }}'
if git diff --exit-code --name-status; then
echo "Repository not updated because no change has been detected"
elif [ '${{ github.event_name }}' != 'push' ]; then
echo "Repository not updated because it's a '${{ github.event_name }}' operation and not a 'push' one"
elif [ '${{ github.repository }}' != 'concretecms/concretecms' ]; then
echo "Repository not updated because it's '${{ github.repository }}' and not 'concretecms/concretecms'"
else
echo 'Changes detected!'
git config --local user.name 'GitHub Action'
git config --local user.email '[email protected]'
git add -A
git commit -m 'Update built assets'
git push
fi
18 changes: 7 additions & 11 deletions application/bootstrap/autoload.php
Original file line number Diff line number Diff line change
@@ -1,18 +1,14 @@
<?php

defined('C5_EXECUTE') or die('Access Denied.');
declare(strict_types=1);

/*
* ----------------------------------------------------------------------------
* Load all composer autoload items.
* ----------------------------------------------------------------------------
*/
defined('C5_EXECUTE') or die('Access Denied.');

// If the checker class is already provided, likely we have been included in a separate composer project
if (!class_exists(\DoctrineXml\Checker::class)) {
// Otherwise, lets try to load composer ourselves
if (!@include(DIR_BASE_CORE . '/' . DIRNAME_VENDOR . '/autoload.php')) {
// If the follwing class is already provided, we are likely in a composer-based Concrete installation
if (!class_exists(Illuminate\Container\Container::class)) {
// Otherwise, let's try to load composer ourselves
if (!@include DIR_BASE_CORE . '/' . DIRNAME_VENDOR . '/autoload.php') {
echo 'Third party libraries not installed. Make sure that composer has required libraries in the concrete/ directory.';
die(1);
exit(1);
}
}
2 changes: 2 additions & 0 deletions build/libraries/built-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ function getBuiltFiles()
'css/features/profile/frontend.css',
'css/features/search/frontend.css',
'css/features/social/frontend.css',
'css/features/staging/frontend.css',
'css/features/taxonomy/frontend.css',
'css/features/testimonials/frontend.css',
'css/features/video/frontend.css',
Expand All @@ -100,6 +101,7 @@ function getBuiltFiles()
'js/features/maps/frontend.js',
'js/features/multilingual/frontend.js',
'js/features/navigation/frontend.js',
'js/features/forms/frontend.js',
'js/fullcalendar.js',
'js/jquery.js',
'js/tui-image-editor.js',
Expand Down
Loading

0 comments on commit 0b78b1a

Please sign in to comment.