Skip to content

Commit

Permalink
feat: Complete overhaul
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Reworked the entire plugin
  • Loading branch information
seebeen committed Nov 30, 2022
1 parent e10868e commit 8d58f32
Show file tree
Hide file tree
Showing 33 changed files with 1,791 additions and 863 deletions.
44 changes: 24 additions & 20 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.php]
indent_size = 4

[*.scss]
indent_size = 2

[*.js]
indent_size = 2
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.php]
indent_size = 4

[*.scss]
indent_size = 2

[*.js]
indent_size = 2

[{composer.json,package.json}]
indent_size = 4

1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.* @seebeen
*.* @oblakbot
1 change: 1 addition & 0 deletions .github/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ NEXT_VERSION=$1
CURRENT_VERSION=$(cat $PROJECT_NAME.php | 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" serbian-addons-for-woocommerce.php
sed -i "s/'$CURRENT_VERSION'/'$NEXT_VERSION'/g" lib/Serbian_WooCommerce.php
sed -i "s/Stable tag: $CURRENT_VERSION/Stable tag: $NEXT_VERSION/g" ./.wordpress-org/readme.txt

rm -f /tmp/release.zip
Expand Down
114 changes: 57 additions & 57 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,57 +1,57 @@
name: Build and release
on:
push:
branches:
- master
paths-ignore:
- '.wordpress-org/**'
- '.github/workflows/wp-deploy.yml'
- '.github/workflows/wp-assets.yml'
- '.github/scripts/deploy.sh'
- 'README.md'
- 'CHANGELOG.md'
- '.codeclimate.yml'

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2.4.0
with:
node-version: 16
cache: yarn
- name: Cache Composer dependencies
uses: actions/cache@v2.1.6
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Install composer dependencies
uses: php-actions/composer@v6
with:
php_version: 7.4
version: 2
dev: no
quiet: yes
args: --optimize-autoloader --classmap-authoritative --prefer-dist
- name: Install Yarn dependencies
run: yarn install
- name: Lint
run: yarn lint
- name: Build
run: "yarn build:production"
- 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: yarn run semantic-release


name: Build and release
on:
push:
branches:
- master
paths-ignore:
- '.wordpress-org/**'
- '.github/workflows/wp-deploy.yml'
- '.github/workflows/wp-assets.yml'
- '.github/scripts/deploy.sh'
- 'README.md'
- 'CHANGELOG.md'
- '.codeclimate.yml'

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- name: Cache Composer dependencies
uses: actions/cache@v2.1.6
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Install composer dependencies
uses: php-actions/composer@v6
with:
php_version: 7.3
version: 2
dev: no
quiet: yes
args: --optimize-autoloader --classmap-authoritative --prefer-dist
- name: Install Yarn dependencies
run: yarn install
- name: Lint
run: yarn lint
- name: Build
run: "yarn build:production"
- 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: yarn run semantic-release


16 changes: 0 additions & 16 deletions .php-cs-fixer.php

This file was deleted.

4 changes: 2 additions & 2 deletions .wordpress-org/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ Contributors: oblakstudio, seebeen
Donate link: https://srbizasrbe.org
Tags: serbia, woocommerce, woocommerce-serbia
Requires at least: 5.6
Tested up to: 5.8
Requires PHP: 7.2
Tested up to: 6.1
Requires PHP: 7.3
Stable tag: 1.2.4
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down
48 changes: 26 additions & 22 deletions assets/styles/components/_billing_fields.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,26 @@
.woocommerce-checkout,
.woocommerce-edit-address {
.woocommerce-billing-fields,
.woocommerce-address-fields {
.entity-type-control {
.woocommerce-input-wrapper {
label {
display: inline-block;
margin-right: 10px;
}
}
}

.hide-if-person {
display: none;

&.shown {
display: block;
}
}
}
}
.woocommerce-checkout,
.woocommerce-edit-address {
.woocommerce-billing-fields,
.woocommerce-address-fields {
.entity-type-control {
.woocommerce-input-wrapper {
label {
display: inline-block;
margin-right: 10px;
}

.description {
display: block !important;
}
}
}

.hide-if-person {
display: none;

&.shown {
display: block;
}
}
}
}
36 changes: 28 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,31 @@
{
"autoload": {
"psr-4": {
"Oblak\\WCRS\\": "lib/"
}
},
"require": {
"oblak/serbian-validators": "^1.0",
"oblak/asset-loader": "^1.1"
"autoload": {
"psr-4": {
"Oblak\\WCRS\\": "lib/"
}
},
"require": {
"oblak/asset-loader": "^1",
"oblak/serbian-validators": "^1.0",
"oblak/wp-plugin-installer": "^1"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1",
"wp-coding-standards/wpcs": "*",
"phpcompatibility/phpcompatibility-wp": "*",
"woocommerce/woocommerce-sniffs": "^0.1.2"
},
"scripts": {
"install-codestandards": [
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
],
"post-install-cmd": [
"@install-codestandards"
]
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading

0 comments on commit 8d58f32

Please sign in to comment.