Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f0cc77dddb | |||
| db95c7853b | |||
| 8da87c8c03 | |||
|
|
d71bcbea58 | ||
| ea6ea954ba | |||
|
|
7c5e729f67 |
33
README.md
33
README.md
@@ -0,0 +1,33 @@
|
|||||||
|
Siti Delivery Time Notices
|
||||||
|
==========================
|
||||||
|
|
||||||
|
WordPress/WooCommerce plugin dat levertermijnen toont op productpagina's.
|
||||||
|
|
||||||
|
Release workflow
|
||||||
|
----------------
|
||||||
|
|
||||||
|
De centrale workflow `.gitea/workflows/release.yml` hergebruikt `SitiWeb/ci-workflows/.gitea/workflows/wp-plugin-release.yml` en verwacht een aantal repository secrets/vars.
|
||||||
|
|
||||||
|
### Verplichte secret
|
||||||
|
|
||||||
|
- `RELEASE_TOKEN`: personal access token op `git.robert.ooo` met minimaal `repository`/`api` toegang. Wordt gebruikt om tags, releases en assets via de Gitea API aan te maken. Voeg hem toe via **Settings → Secrets → New secret** en geef exact deze naam.
|
||||||
|
|
||||||
|
### Optionele variables
|
||||||
|
|
||||||
|
- `RELEASE_SERVER_URL`: alleen nodig wanneer de Gitea server-URL niet automatisch kan worden afgeleid. Waarde lijkt `https://git.robert.ooo` te moeten zijn.
|
||||||
|
- `RELEASE_REPOSITORY`: `owner/repo` string, bijvoorbeeld `roberto/siti-delivery-time-notices`.
|
||||||
|
|
||||||
|
### Lokale runs met `act`
|
||||||
|
|
||||||
|
Secrets van de server worden lokaal niet automatisch ingeladen. Gebruik `act` daarom als volgt:
|
||||||
|
|
||||||
|
```
|
||||||
|
act workflow_dispatch \
|
||||||
|
-s RELEASE_TOKEN=glpat-xxxxxxxx \
|
||||||
|
-s RELEASE_SERVER_URL=https://git.robert.ooo \
|
||||||
|
-s RELEASE_REPOSITORY=roberto/siti-delivery-time-notices
|
||||||
|
```
|
||||||
|
|
||||||
|
Een alternatief is een `.secrets` file naast de repo met bovenstaande sleutels.
|
||||||
|
|
||||||
|
Zonder `RELEASE_TOKEN` breekt de release-stap af en worden er geen tag of release aangemaakt.
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ final class SitiDeliveryTimeNotice {
|
|||||||
public static function enqueue_assets(): void {
|
public static function enqueue_assets(): void {
|
||||||
wp_enqueue_script(
|
wp_enqueue_script(
|
||||||
'lb-levertijden',
|
'lb-levertijden',
|
||||||
plugins_url('assets/js/levertijden.js', __FILE__),
|
plugins_url('assets/js/levertijden.js', SITI_DELIVERY_TIME_NOTICES_FILE),
|
||||||
['jquery'],
|
['jquery'],
|
||||||
'1.0.2',
|
'1.0.2',
|
||||||
true
|
true
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"plugin_name": "Siti Delivery Time Notices",
|
"plugin_name": "Siti Delivery Time Notices",
|
||||||
"description": "A plugin to show delivery time notices on WooCommerce products.",
|
"description": "A plugin to show delivery time notices on WooCommerce products.",
|
||||||
"version": "1.0.0",
|
"version": "1.0.2",
|
||||||
"author": "Roberto Guagliardo | SitiWeb",
|
"author": "Roberto Guagliardo | SitiWeb",
|
||||||
"author_url": "https://sitiweb.nl/"
|
"author_url": "https://sitiweb.nl/"
|
||||||
}
|
}
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
* Plugin Name: Siti Delivery Time Notices
|
* Plugin Name: Siti Delivery Time Notices
|
||||||
* Plugin URI: https://plugins.robert.ooo/plugin/
|
* Plugin URI: https://plugins.robert.ooo/plugin/
|
||||||
* Description: A plugin to show delivery time notices on WooCommerce products.
|
* Description: A plugin to show delivery time notices on WooCommerce products.
|
||||||
* Version: 1.0.1
|
* Version: 1.0.2
|
||||||
* Requires at least: 5.2
|
* Requires at least: 5.2
|
||||||
* Requires PHP: 7.2
|
* Requires PHP: 7.2
|
||||||
* Author: Roberto Guagliardo | SitiWeb
|
* Author: Roberto Guagliardo | SitiWeb
|
||||||
@@ -26,6 +26,10 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
|
|
||||||
define('SITI_DELIVERY_TIME_NOTICES_SLUG', 'siti-delivery-time-notices' );
|
define('SITI_DELIVERY_TIME_NOTICES_SLUG', 'siti-delivery-time-notices' );
|
||||||
|
|
||||||
|
if ( ! defined( 'SITI_DELIVERY_TIME_NOTICES_FILE' ) ) {
|
||||||
|
define( 'SITI_DELIVERY_TIME_NOTICES_FILE', __FILE__ );
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! defined( 'SITI_DELIVERY_TIME_NOTICES_VERSION' ) ) {
|
if ( ! defined( 'SITI_DELIVERY_TIME_NOTICES_VERSION' ) ) {
|
||||||
$plugin_data = get_file_data(
|
$plugin_data = get_file_data(
|
||||||
__FILE__,
|
__FILE__,
|
||||||
|
|||||||
Reference in New Issue
Block a user