Skip to content

Commit

Permalink
feat: Reworked the core
Browse files Browse the repository at this point in the history
BREAKING Change: Complete rewrite
  • Loading branch information
seebeen committed Jul 27, 2023
1 parent 4567c4c commit 764661c
Show file tree
Hide file tree
Showing 20 changed files with 6,412 additions and 4,032 deletions.
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.github export-ignore
.yarn export-ignore
.editorconfig export-ignore
.gitignore export-ignore
.phpcs.xml export-ignore
.releaserc export-ignore
.yarnrc.yml export-ignore
composer.lock export-ignore
package.json export-ignore
yarn.lock export-ignore
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* @oblakbot
* @seebeen
55 changes: 30 additions & 25 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@
name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install Yarn dependencies
run: yarn install
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release

name: Release
on:
push:
branches:
- master
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.OBLAK_BOT_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install NPM dependencies
run: npm install
- name: Release
env:
GIT_AUTHOR_NAME: "oblakbot"
GIT_AUTHOR_EMAIL: "sibin.grasic+bot@oblak.studio"
GIT_COMMITTER_NAME: "oblakbot"
GIT_COMMITTER_EMAIL: "sibin.grasic+bot@oblak.studio"
GITHUB_TOKEN: ${{ secrets.OBLAK_BOT_TOKEN }}
run: npm run semantic-release
8 changes: 8 additions & 0 deletions .github/workflows/scripts/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

NEXT_VERSION=$1
CURRENT_VERSION=$(cat composer.json | grep version | head -1 | awk -F= "{ print $2 }" | sed 's/[version:,\",]//g' | tr -d '[[:space:]]')

sed -i "s/\"version\": \"$CURRENT_VERSION\"/\"version\": \"$NEXT_VERSION\"/g" composer.json

zip -r "/tmp/extremis-core-$NEXT_VERSION.zip" composer.json README.md CHANGELOG.md src
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
composer.phar
vendor
node_modules
build/*.zip
.vscode
node_modules
vendor
57 changes: 57 additions & 0 deletions .phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0"?>
<ruleset name="WordPress Plugin">
<config name="minimum_supported_wp_version" value="6.0" />
<config name="testVersion" value="8.0-"/>
<rule ref="PHPCompatibilityWP"/>
<rule ref="WordPress-Core">
<!-- a couple of excldes since I dont want any issues with composer packages -->
<!-- <exclude name="Squiz.Functions.FunctionDeclarationArgumentSpacing.SpacingAfterOpen"/> -->
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterOpenParenthesis" /> -->
<!-- <exclude name="WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceBeforeCloseParenthesis" /> -->
<exclude name="WordPress.Files.FileName.NotHyphenatedLowercase" />
<exclude name="WordPress.Files.FileName.InvalidClassFileName" />
</rule>
<rule ref="WordPress-Docs">
<type>warning</type>
</rule>
<rule ref="WordPress-Extra" />
<!-- <rule ref="VariableAnalysis" /> -->
<rule ref="WordPress.WP.I18n">
<properties>
<!-- CONFIGURE HERE YOUR text-domain -->
<property name="text_domain" type="array" value="" />
</properties>
</rule>
<rule ref="Squiz.PHP.CommentedOutCode.Found">
<severity>0</severity>
</rule>



<!-- CONFIGURE HERE THE PATHS YOU WANT TO CHECK -->
<file>src</file>

<!-- Show sniff codes in all reports -->
<arg value="sp"/> <!-- Show sniff and progress -->
<arg name="parallel" value="8"/> <!-- Enables parallel processing when available for faster results. -->
<arg name="colors"/>
<arg name="extensions" value="php"/>

<!-- Configure here the paths you want to IGNORE -->
<exclude-pattern>/docker/*</exclude-pattern>
<exclude-pattern>/node_modules/*</exclude-pattern>
<exclude-pattern>/tests/*</exclude-pattern>
<exclude-pattern>/vendor/*</exclude-pattern>

<rule ref="WordPress">
<exclude name="Generic.WhiteSpace.DisallowSpaceIndent" />
</rule>

<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
<property name="indent" value="4"/>
<property name="tabIndent" value="false"/>
</properties>
</rule>
<rule ref="Generic.WhiteSpace.DisallowTabIndent" />
</ruleset>
67 changes: 44 additions & 23 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -1,23 +1,44 @@
{
"branches": ["master", "next"],
"plugins": [
["@semantic-release/changelog", {
"changelogFile": "CHANGELOG.md"
}],
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/exec", {
"prepareCmd": "sh ./build/release.sh ${nextRelease.version}"
}],
["@semantic-release/git", {
"assets": ["CHANGELOG.md", "composer.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}],
["@semantic-release/github", {
"assets": [
{"path": "build/*.zip", "label": "Version ${nextRelease.version}"}
]
}]
]
}

{
"branches": [
"master",
"next"
],
"plugins": [
[
"@semantic-release/changelog",
{
"changelogFile": "CHANGELOG.md"
}
],
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/exec",
{
"prepareCmd": "sh ./.github/scripts/release.sh ${nextRelease.version}"
}
],
[
"@semantic-release/git",
{
"assets": [
"CHANGELOG.md",
"composer.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
"assets": [
{
"path": "tmp/release.zip",
"name": "extremis-core-${nextRelease.version}.zip",
"label": "Extremis Core v${nextRelease.version}"
}
]
}
]
]
}
Binary file added .yarn/install-state.gz
Binary file not shown.
874 changes: 874 additions & 0 deletions .yarn/releases/yarn-3.6.1.cjs

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
enableGlobalCache: true

nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.6.1.cjs
47 changes: 32 additions & 15 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
{
"name": "oblak/extremis-core",
"description": "Core files for Extremis",
"license": "GPL-2.0-or-later",
"version": "1.0.0",
"autoload": {
"psr-4": {
"Extremis\\": "src/"
}
},
"require" : {
"illuminate/config": "^8.35",
"illuminate/container": "^8.37"
}
}
{
"name": "oblak/extremis-core",
"description": "Core files for Extremis",
"license": "GPL-2.0-or-later",
"version": "1.0.0",
"autoload": {
"psr-4": {
"Extremis\\": "src"
},
"files": [
"/src/Utils/extremis-helpers.php"
]
},
"require": {
"php": ">=8.0",
"oblak/wp-asset-loader": "^2.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "3.*",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"wp-coding-standards/wpcs": "^2",
"phpcompatibility/phpcompatibility-wp": "^2"
},
"suggest": {
"oblak/composer-autoconstructor-plugin": "Automatically construct theme classes"
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading

0 comments on commit 764661c

Please sign in to comment.