Skip to content

Commit

Permalink
Build system
Browse files Browse the repository at this point in the history
  • Loading branch information
nikosdion committed Jul 16, 2024
1 parent a720fe2 commit a7cc949
Show file tree
Hide file tree
Showing 6 changed files with 169 additions and 20 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Panopticon Connector for WordPress 1.0.0
================================================================================

~ Initial release
2 changes: 1 addition & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Please note that using these rules will prevent [WP-CLI](https://wp-cli.org/) fr

## 📋 CHANGELOG

* ✨ Troubleshooting aid for API application errors when connecting a Panopticon site
* Initial release

Legend:
* 🚨 Security update
Expand Down
130 changes: 130 additions & 0 deletions build.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
<?xml version="1.0"?>

<!--
~ @package panopticon
~ @copyright Copyright (c)2023-2024 Nikolaos Dionysopoulos / Akeeba Ltd
~ @license https://www.gnu.org/licenses/agpl-3.0.txt GNU Affero General Public License, version 3 or later
-->

<project name="panopticon" description="Akeeba Panopticon Connector for WordPress" default="git">
<import file="${phing.dir}/../buildfiles/phing/common.xml"/>

<!-- Override properties set up in common.xml -->
<property name="dirs.root" value="${phing.dir}" override="true"/>
<property name="dirs.release" value="${dirs.root}/release" override="true"/>
<property name="dirs.templates" value="${phing.dir}/build/templates" override="true" />

<!-- Load externally defined properties -->
<property file="${phing.dir.common}/default.properties" override="true"/>
<property file="${phing.dir}/../build.properties" override="true"/>
<property file="${phing.dir}/../build.${host.os}.properties" override="true"/>
<property file="${phing.dir}/build/build.properties" override="true"/>
<property file="${phing.dir}/build/override.properties" override="true"/>
<property file="${phing.dir}/build.properties" override="true"/>
<property file="${phing.dir}/override.properties" override="true"/>

<!--
====================================================================================================
File sets
====================================================================================================
-->

<fileset dir="${dirs.root}" id="wpplugin" expandsymboliclinks="true">
<include name="includes/**"/>
<include name="vendor/**"/>

<include name="panopticon.php"/>
<include name="readme.txt"/>

<!-- Don't copy vendor stuff I do not need -->
<exclude name="app/vendor/bin/**"/>
<exclude name="app/vendor/composer/installers/**"/>
<exclude name="app/vendor/z4kn4fein/php-semver/.github/**"/>
<exclude name="app/vendor/z4kn4fein/php-semver/.gitattributes"/>
<exclude name="app/vendor/z4kn4fein/php-semver/.gitignore"/>
<exclude name="app/vendor/z4kn4fein/php-semver/phpcs.xml"/>
<exclude name="app/vendor/z4kn4fein/php-semver/phpunit.xml"/>
</fileset>

<!--
====================================================================================================
Tasks - General
====================================================================================================
-->
<target name="git" description="Makes only packages, not the documentation"
depends="new-release,composer-install,setup-properties,wp-package">
</target>

<target name="new-release" depends="composer-install,link">
<echo>Emptying release directory</echo>
<delete dir="${dirs.release}" quiet="true" includeemptydirs="true"/>
<mkdir dir="${dirs.release}"/>

<!-- Removing .DS_Store files -->
<echo>Removing .DS_Store files</echo>
<exec executable="sh" dir="${dirs.root}">
<arg value="killDS.sh"/>
</exec>
</target>

<target name="setup-properties" description="Set up version and build properties">
<!-- Initialize the build.date timestamp -->
<tstamp>
<format property="build.date" pattern="yyyy-MM-dd"/>
</tstamp>

<!-- Initialize the version if it's not set -->
<if>
<equals arg1="${version}" arg2="git"/>
<then>
<autoversion workingCopy="${dirs.root}" propertyName="version"/>
</then>
</if>

<filterchain id="standard-tokens">
<replacetokens begintoken="##" endtoken="##">
<token key="DATE" value="${build.date}"/>
<token key="VERSION" value="${version}"/>
</replacetokens>
</filterchain>
</target>

<!--
====================================================================================================
Tasks - Documentation
====================================================================================================
-->

<target name="documentation" description="Creates the documentation packages">
<echo>No documentation for the connector itself.</echo>
</target>

<!--
====================================================================================================
Tasks - Installable packages
====================================================================================================
-->
<target name="wp-package" description="Component package build"
depends="new-release,setup-properties">

<echo>Processing readme.txt</echo>
<!-- Process the readme.txt file -->
<copy file="${dirs.templates}/readme.txt" tofile="${dirs.root}/readme.txt" overwrite="true">
<filterchain refid="standard-tokens"/>
</copy>

<echo>Creating plugin entry point file</echo>
<wordpressentrypoint
file="${dirs.root}/panopticon.php"
name="Akeeba Panopticon Connector for WordPress"
version="${version}"
/>

<echo>Making package</echo>
<zipme basedir="${dirs.root}" destfile="${dirs.release}/panopticon-${version}.zip"
includeemptydirs="true" prefix="panopticon">
<fileset refid="wpplugin"/>
</zipme>
</target>

</project>
2 changes: 1 addition & 1 deletion build/build.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
release.method=github
github.organization=akeeba
github.repository=panopticon_connector_wp
github.release.file=panopticon*.zip
github.release.file=panopticon-*.zip

build.component=panopticon
build.has_pro=0
Expand Down
16 changes: 16 additions & 0 deletions build/templates/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
=== Akeeba Panopticon Connector for WordPress ===
Contributors: nikosdion
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=10903325
Tags: panopticon, connector, backup, security
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.2
Stable tag: ##VERSION##
License: AGPL-3.0-or-later
License URI: https://www.gnu.org/licenses/agpl-3.0.html

Use your WordPress site with Akeeba Panopticon

== Description ==

This plugin provides the API endpoints which allow you to use your site with Akeeba Panopticon.
35 changes: 17 additions & 18 deletions panopticon.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,25 @@
* @license https://www.gnu.org/licenses/agpl-3.0.txt GNU Affero General Public License, version 3 or later
*/

/*
Plugin Name: Akeeba Panopticon Connector for WordPress
Plugin URI: https://github.com/akeeba/panopticon_connector_wp
Description: Use your WordPress site with Akeeba Panopticon
Version: 1.0.0
Panopticon API: 100
Requires PHP: 7.2
Requires at least: 5.0
Tested up to: 6.4
Author: akeeba
Author URI: http://www.akeeba.com
License: AGPL-3.0+
License URI: https://www.gnu.org/licenses/agpl-3.0.html
GitHub Plugin URI: https://github.com/akeeba/panopticon_connector_wp
Update URI: false
*/

defined('WPINC') || die;

/**
* @wordpress-plugin
* Plugin Name: Akeeba Panopticon Connector for WordPress
* Plugin URI: https://github.com/akeeba/panopticon_connector_wp
* Description: Use your WordPress site with Akeeba Panopticon
* Version: 1.0.0
* Release Date: 2023-11-15
* Panopticon API: 100
* Requires PHP: 7.2
* Requires at least: 5.0
* Tested up to: 6.4
* Author: akeeba
* Author URI: http://www.akeeba.com
* License: AGPL-3.0+
* License URI: https://www.gnu.org/licenses/agpl-3.0.html
* GitHub Plugin URI: https://github.com/akeeba/panopticon_connector_wp
* Update URI: false
*/
class PanopticonPlugin
{
/**
Expand Down

0 comments on commit a7cc949

Please sign in to comment.