forked from concretecms/concretecms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3,071 changed files
with
16,703 additions
and
12,741 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: Build assets | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "**" | ||
tags-ignore: | ||
- "**" | ||
|
||
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: Check if we need to create a pull request | ||
if: matrix.update-repo == 'yes' | ||
id: pr-test | ||
run: | | ||
cd '${{ github.workspace }}' | ||
if git diff --exit-code --name-status; then | ||
echo "We won't create a pull request because no change has been detected" | ||
elif [ '${{ github.event_name }}' != 'push' ]; then | ||
echo "We won't create a pull request because it's a '${{ github.event_name }}' operation and not a 'push' one" | ||
elif [ '${{ github.repository }}' != 'concretecms/concretecms' ]; then | ||
echo "We won't create a pull request because the current repository is '${{ github.repository }}' and not 'concretecms/concretecms'" | ||
else | ||
echo 'Changes detected and pull request needed!' | ||
echo "result=yes" >>"$GITHUB_OUTPUT" | ||
echo "branch-name=auto-assets/$(date --utc +%Y%m%d-%H%M%S)" >>"$GITHUB_OUTPUT" | ||
fi | ||
- name: Create pull request | ||
id: pr-create | ||
if: steps.pr-test.outputs.result == 'yes' | ||
uses: peter-evans/create-pull-request@v5 | ||
with: | ||
commit-message: Automatic assets rebuilding | ||
committer: GitHub Action <[email protected]> | ||
author: GitHub Action <[email protected]> | ||
branch: '${{ steps.pr-test.outputs.branch-name }}' | ||
title: "Automatic assets rebuilding for ${{ github.ref_name }}" | ||
body: "Created by ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" | ||
- name: Pull request info | ||
if: steps.pr-test.outputs.result == 'yes' | ||
run: printf 'Pull request created:\n%s' "${{ steps.pr-create.outputs.pull-request-url }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Check Syntax | ||
|
||
on: | ||
pull_request: | ||
push: | ||
|
||
jobs: | ||
check-syntax: | ||
name: PHP | ||
runs-on: ubuntu-latest | ||
steps: | ||
- | ||
name: Checkout | ||
uses: actions/checkout@v4 | ||
- | ||
name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
# This should be the value of Concrete\Core\Install\Preconditions\PhpVersion::MINIMUM_PHP_VERSION | ||
php-version: 7.3 | ||
extensions: opcache | ||
coverage: none | ||
tools: none | ||
- | ||
name: Check syntax | ||
uses: mlocati/check-php-syntax@main | ||
with: | ||
directory: concrete | ||
include: | | ||
bin/concrete | ||
bin/concrete5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
include: | ||
- template: Jobs/SAST.latest.gitlab-ci.yml | ||
- template: Jobs/Dependency-Scanning.latest.gitlab-ci.yml | ||
- template: Jobs/Secret-Detection.latest.gitlab-ci.yml |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.