Skip to content

Commit

Permalink
Merge pull request #3 from omnisend/plugin-release
Browse files Browse the repository at this point in the history
Plugin release
  • Loading branch information
greta-mik authored Sep 11, 2024
2 parents 18f8055 + dd17360 commit 2c55734
Show file tree
Hide file tree
Showing 30 changed files with 618 additions and 49 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @omnisend/integrations
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: PHP Standards
run-name: PHP Standards 🔀 ${{ github.ref_name }}

on: push

jobs:
Lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Install dependencies
run: |
composer install --prefer-dist --no-progress
- name: Lint PHP files
run: ./lint.sh check
16 changes: 16 additions & 0 deletions .github/workflows/publish-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish plugin

on: [workflow_dispatch]
jobs:
svn:
name: Release new tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: WordPress Plugin Deploy
uses: omnisend/[email protected]
env:
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SLUG: omnisend-for-lifterlms-add-on
BUILD_DIR: omnisend-for-lifterlms
70 changes: 22 additions & 48 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,50 +1,24 @@
# These are some examples of commonly ignored file patterns.
# You should customize this list as applicable to your project.
# Learn more about .gitignore:
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore
.vscode/*
.idea/*
.svn

# Node artifact files
node_modules/
dist/

# Compiled Java class files
*.class

# Compiled Python bytecode
*.py[cod]

# Log files
*.log

# Package files
*.jar

# Maven
target/
dist/

# JetBrains IDE
.idea/

# Unit test reports
TEST*.xml

# Generated by MacOS
# These are needed when repo is checked out at the location of working WordPress site
.DS_Store

# Generated by Windows
Thumbs.db

# Applications
*.app
*.exe
*.war

# Large media files
*.mp4
*.tiff
*.avi
*.flv
*.mov
*.wmv

akismet/
hello.php
index.php
klaviyo
mailchimp-for-woocommerce
woocommerce
wp-crontrol
code-snippets

# Composer
composer.phar
/vendor/

# Local wordpress setup
.wordpress
.env

*.zip
5 changes: 5 additions & 0 deletions .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
tabWidth: 4
printWidth: 140
singleQuote: true
trailingComma: none
bracketSpacing: true
Binary file added .wordpress-org/banner-1544x500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/banner-772x250.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .wordpress-org/screenshot-7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 43 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
<h1>wp-omnisend-lifterlms</h1>
# wp-omnisend-lifterlms

Plugin for _LifterLMS_ WordPress plugin. More information can be found [here](https://wordpress.com/plugins/lifterlms).


## PHP Linting

WordPress.org team mandates our plugin to be linted
against [WordPress coding standards](https://github.com/WordPress/WordPress-Coding-Standards).

After each push to any branch `PHP Standards` action will run and all the PHP code will be linted. See action output for results.

### Linting locally

Tools needed:

- php (7.4 version is recommended because at the time of writing WordPress coding standards supports only up to 7.4 version);
- composer (can be installed as described in https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos);

After installing those tools one can run in local plugin dir (omnisend-for-contact-form-7) helper script:

```shell
./lint.sh check
./lint.sh fix
```

or all commands manually. Following commands

```shell
composer update
composer install
```

install linting tool and standards. And then actual linting `phpcs` script can be initiated with

```shell
./vendor/squizlabs/php_codesniffer/bin/phpcs --ignore=.js --standard=WordPress omnisend-connect
```

A second `phpcbf` script can be run to automatically correct coding standard violations:

```shell
./vendor/squizlabs/php_codesniffer/bin/phpcbf --ignore=.js --standard=WordPress omnisend-connect
16 changes: 16 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "omnisend/lifterlms-addon",
"description": "Omnisend for LifterLMS Add-on",
"license": "proprietary",
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
},
"require-dev": {
"php": ">=7.1.0",
"wp-coding-standards/wpcs": "^3.0",
"squizlabs/php_codesniffer": "^3.7.1",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0"
}
}
Loading

0 comments on commit 2c55734

Please sign in to comment.