9 Commits

Author SHA1 Message Date
Arne Weiss a9d8966e22 Bump version to 0.1.3
Build / build (push) Successful in 12s
Release / release (push) Successful in 11s
2026-06-01 08:32:02 +02:00
Arne Weiss b742a833d1 Fix admin controller l() error and redundant CI runs
Add l() wrapper to AdminSimpleWithdrawalController so PS8 routing does
not throw UndefinedMethodError; restrict build workflow to branch pushes
only so tag pushes no longer trigger a redundant build run.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-01 08:26:10 +02:00
Arne Weiss 8ed50fa8e6 Bump version to 0.1.2
Build / build (push) Successful in 12s
Release / release (push) Successful in 12s
2026-06-01 08:24:40 +02:00
Arne Weiss 03ef0f0a99 Bump version to 0.1.1
Build / build (push) Successful in 14s
Release / release (push) Successful in 11s
2026-06-01 08:17:53 +02:00
Arne Weiss b3547946cc Add release.sh for patch version bumping
Build / build (push) Successful in 13s
2026-06-01 08:17:18 +02:00
Arne Weiss d838a4dcc0 Fix admin controller: call parent::__construct() before fields_list translations
Build / build (push) Successful in 13s
2026-06-01 08:13:46 +02:00
Arne Weiss 2a5b58ad3e Fix release pipeline: add contents:write permission, log API response
Build / build (push) Successful in 10s
Release / release (push) Successful in 11s
2026-06-01 08:10:17 +02:00
Arne Weiss 920d837fb9 Add Gitea Actions CI/CD pipeline with release workflow
Build / build (push) Successful in 9s
Release / release (push) Failing after 8s
2026-06-01 08:08:34 +02:00
Arne Weiss 0691fa7f22 Add simple_withdrawalbutton PrestaShop module 2026-06-01 08:08:31 +02:00
5 changed files with 57 additions and 7 deletions
+4 -1
View File
@@ -2,6 +2,8 @@ name: Build
on:
push:
branches:
- '**'
pull_request:
jobs:
@@ -27,7 +29,8 @@ jobs:
cp -rp . /tmp/$MODULE
rm -rf /tmp/$MODULE/.git \
/tmp/$MODULE/.gitea \
/tmp/$MODULE/CLAUDE.md
/tmp/$MODULE/CLAUDE.md \
/tmp/$MODULE/release.sh
cd /tmp && zip -r ${MODULE}.zip $MODULE/
mkdir -p $GITHUB_WORKSPACE/dist
mv /tmp/${MODULE}.zip $GITHUB_WORKSPACE/dist/
+12 -3
View File
@@ -8,6 +8,8 @@ on:
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
container:
image: php:8.2-cli-alpine
@@ -28,7 +30,8 @@ jobs:
cp -rp . /tmp/$MODULE
rm -rf /tmp/$MODULE/.git \
/tmp/$MODULE/.gitea \
/tmp/$MODULE/CLAUDE.md
/tmp/$MODULE/CLAUDE.md \
/tmp/$MODULE/release.sh
cd /tmp && zip -r ${MODULE}.zip $MODULE/
mkdir -p $GITHUB_WORKSPACE/dist
mv /tmp/${MODULE}.zip $GITHUB_WORKSPACE/dist/
@@ -38,11 +41,17 @@ jobs:
TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: |
RELEASE_ID=$(curl -sf -X POST \
RESPONSE=$(curl -s -X POST \
-H "Authorization: token $TOKEN" \
-H "Content-Type: application/json" \
"$GITHUB_SERVER_URL/api/v1/repos/$GITHUB_REPOSITORY/releases" \
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\"}" | jq -r '.id')
-d "{\"tag_name\":\"$TAG\",\"name\":\"$TAG\"}")
echo "API response: $RESPONSE"
RELEASE_ID=$(echo "$RESPONSE" | jq -r '.id')
if [ -z "$RELEASE_ID" ] || [ "$RELEASE_ID" = "null" ]; then
echo "Failed to create release" && exit 1
fi
curl -sf -X POST \
-H "Authorization: token $TOKEN" \
@@ -20,6 +20,8 @@ class AdminSimpleWithdrawalController extends ModuleAdminController
$this->list_no_link = false;
$this->actions = ['view'];
parent::__construct();
$this->fields_list = [
'id_withdrawal_request' => [
'title' => $this->l('ID'),
@@ -56,8 +58,15 @@ class AdminSimpleWithdrawalController extends ModuleAdminController
'filter_key' => 'a!status',
],
];
}
parent::__construct();
protected function l($string, $class = null, $addslashes = false, $htmlentities = true)
{
if ($this->module) {
return $this->module->l($string, 'AdminSimpleWithdrawalController');
}
return $string;
}
public function renderScopeLabel($value, $row)
Executable
+29
View File
@@ -0,0 +1,29 @@
#!/bin/sh
set -e
FILE=simple_withdrawalbutton.php
# Read current version
CURRENT=$(grep "version = '" "$FILE" | grep -o "'[0-9]*\.[0-9]*\.[0-9]*'" | tr -d "'")
if [ -z "$CURRENT" ]; then
echo "Error: could not read version from $FILE" >&2
exit 1
fi
# Increment patch
MAJOR=$(echo "$CURRENT" | cut -d. -f1)
MINOR=$(echo "$CURRENT" | cut -d. -f2)
PATCH=$(echo "$CURRENT" | cut -d. -f3)
NEW="$MAJOR.$MINOR.$((PATCH + 1))"
echo "Version: $CURRENT$NEW"
# Write new version into module file
sed -i "s/version = '$CURRENT'/version = '$NEW'/" "$FILE"
# Commit, tag, push — triggers release pipeline on Gitea
git add "$FILE"
git commit -m "Bump version to $NEW"
git tag "v$NEW"
git push
git push origin "v$NEW"
+2 -2
View File
@@ -27,8 +27,8 @@ class Simple_withdrawalbutton extends Module
{
$this->name = 'simple_withdrawalbutton';
$this->tab = 'administration';
$this->version = '0.1.0';
$this->author = 'Cyprès / Akiko Sake';
$this->version = '0.1.3';
$this->author = 'Arne Weiss';
$this->need_instance = 0;
$this->bootstrap = true;
$this->ps_versions_compliancy = [