Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PhiloNL committed Mar 21, 2023
0 parents commit af31bf4
Show file tree
Hide file tree
Showing 119 changed files with 14,650 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Releases

on:
push:
tags:
- '*'

jobs:

build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3

- name: Configure PHP 8.1
uses: shivammathur/setup-php@master
with:
php-version: 8.1
extensions: mbstring, ctype, fileinfo, openssl, PDO, bcmath, json, tokenizer, xml
- name: Install Composer dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist --no-dev --optimize-autoloader
- name: Run Straus
run: ./build.sh $GITHUB_REF_NAME
- uses: ncipollo/release-action@v1
with:
artifacts: "wp-guard.zip"
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/vendor
.DS_Store
.idea
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<img src="https://anystack.sh/img/emblem.svg" width="50" height="50"
alt="Anystack" >

# Secure your WordPress plugins with license keys

Add license and add auto-update support your commercial WordPress plugins in just a matter of minutes with Anystack's plug-and-play licensing package.

* **License activation tracking**.
* Secure auto updates for users with a **valid license**.
* **Plug & Play** integration, it only takes a few lines of code.
* Easy **to customize** via config.

You will need to register an API key at [Anystack](https://anystack.sh) to use this package.
Anystack will help you make an online living selling your software by setting yourself free from billing and logistics so you can focus on building software.


## Usage
To get started, you will need to install this package via Composer:

```shell
composer require anystack-sh/wp-guard
```

Continue to the [installation guide](http://anystack.sh/docs/integrations/wordpress).
21 changes: 21 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash

VERSION=$(echo "$1" | sed 's/[^0-9]//g');

echo "Building v$VERSION..."

sed -i'.bck' -e "s/VDEV/V$VERSION/g" src/WpGuard.php
rm src/WpGuard.php.bck

sed -i'.bck' -e "s/VDEV/V$VERSION/g" composer.json
rm composer.json.bck

echo "Running strauss..."
composer run-script prefix

echo "Cleaning up..."
rm -rf .github .git vendor composer.json composer.lock
rm build.sh

echo "Creating archive..."
zip -r wp-guard.zip .
56 changes: 56 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"name": "anystack/wp-guard",
"description": "Automatic updates and license protection for your WordPress",
"license": "MIT",
"autoload": {
"psr-4": {
"Anystack\\WpGuard\\VDEV\\": "src/"
}
},
"authors": [
{
"name": "Philo Hermans",
"email": "philo@anystack.sh"
}
],
"require": {
"anystack-sh/php-sdk": "dev-main",
"brianhenryie/strauss": "^0.13.0"
},
"scripts": {
"prefix": "vendor/bin/strauss"
},
"extra": {
"strauss": {
"target_directory": "vendor-prefixed",
"namespace_prefix": "Anystack\\WPGuard\\VDEV\\",
"classmap_prefix": "ANYSTACK_WP_GUARD_",
"constant_prefix": "ANYSTACK_WP_GUARD_",
"packages": [
],
"override_autoload": {
},
"exclude_from_copy": {
"packages": [
],
"namespaces": [
],
"file_patterns": [
]
},
"exclude_from_prefix": {
"packages": [
],
"namespaces": [
],
"file_patterns": [
"/^psr.*$/"
]
},
"namespace_replacement_patterns" : {
},
"delete_vendor_packages": false,
"delete_vendor_files": false
}
}
}
Loading

0 comments on commit af31bf4

Please sign in to comment.