Compare commits
18
Commits
5a482b49bb
...
v0.0.5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
36ef203797 | ||
|
|
ba2d1ec1d6 | ||
|
|
d117444bae | ||
|
|
58df03216d | ||
|
|
29402a35ac | ||
|
|
63134f7de4 | ||
|
|
b8b8ee6284 | ||
|
|
b93217cc51 | ||
|
|
61b4b2b1af | ||
|
|
ec5c40c9f2 | ||
|
|
56ada0cedc | ||
|
|
f50154b96b | ||
|
|
7aa11b0396 | ||
|
|
161c35dc8a | ||
|
|
a1f0160ab9 | ||
|
|
1ee83aad37 | ||
|
|
b2c2a8d80b | ||
|
|
31b9e61adb |
No files matched your search
@@ -0,0 +1,40 @@
|
||||
name: version-changelog
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
version-changelog:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Check version bump and changelog entry
|
||||
run: |
|
||||
set -e
|
||||
PR_VERSION=$(grep -m1 '"version"' composer.json | sed -E 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/')
|
||||
MAIN_VERSION=$(git show origin/main:composer.json | grep -m1 '"version"' | sed -E 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/')
|
||||
|
||||
echo "main version: $MAIN_VERSION"
|
||||
echo "PR version: $PR_VERSION"
|
||||
|
||||
if [ "$MAIN_VERSION" = "$PR_VERSION" ]; then
|
||||
echo "::error::composer.json version ($PR_VERSION) was not bumped from main ($MAIN_VERSION)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
HIGHEST=$(printf '%s\n%s\n' "$MAIN_VERSION" "$PR_VERSION" | sort -V | tail -n1)
|
||||
if [ "$HIGHEST" != "$PR_VERSION" ]; then
|
||||
echo "::error::composer.json version ($PR_VERSION) is not greater than main's ($MAIN_VERSION)"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -qF "## [$PR_VERSION]" CHANGELOG.md; then
|
||||
echo "::error::CHANGELOG.md is missing a '## [$PR_VERSION]' heading"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "OK: version bumped to $PR_VERSION and documented in CHANGELOG.md"
|
||||
@@ -0,0 +1,112 @@
|
||||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
env:
|
||||
SERVER_URL: https://git.arthurerlich.de
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
|
||||
- name: Determine version and guard against re-release
|
||||
id: version
|
||||
run: |
|
||||
set -e
|
||||
VERSION=$(grep -m1 '"version"' composer.json | sed -E 's/.*"version"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/')
|
||||
PACKAGE_NAME=$(grep -m1 '"name"' composer.json | sed -E 's/.*"name"[[:space:]]*:[[:space:]]*"([^"]+)".*/\1/')
|
||||
TAG="v${VERSION}"
|
||||
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
|
||||
echo "package_name=${PACKAGE_NAME}" >> "$GITHUB_OUTPUT"
|
||||
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
|
||||
if git ls-remote --tags origin "refs/tags/${TAG}" | grep -q "${TAG}"; then
|
||||
echo "skip=true" >> "$GITHUB_OUTPUT"
|
||||
echo "Tag ${TAG} already exists, nothing to release."
|
||||
else
|
||||
echo "skip=false" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Extract changelog section
|
||||
if: steps.version.outputs.skip == 'false'
|
||||
run: |
|
||||
awk -v ver="${{ steps.version.outputs.version }}" '
|
||||
BEGIN { found=0 }
|
||||
/^## \[/ {
|
||||
if (found) exit
|
||||
if ($0 ~ "\[" ver "\]") { found=1; next }
|
||||
}
|
||||
found { print }
|
||||
' CHANGELOG.md > release-notes.md
|
||||
cat release-notes.md
|
||||
|
||||
- name: Create and push tag
|
||||
if: steps.version.outputs.skip == 'false'
|
||||
run: |
|
||||
git config user.name "gitea-actions"
|
||||
git config user.email "actions@git.arthurerlich.de"
|
||||
git tag "${{ steps.version.outputs.tag }}"
|
||||
git push origin "${{ steps.version.outputs.tag }}"
|
||||
|
||||
- name: Install shopware-cli
|
||||
if: steps.version.outputs.skip == 'false'
|
||||
run: |
|
||||
curl -sL -o /tmp/shopware-cli.tar.gz \
|
||||
https://github.com/shopware/shopware-cli/releases/latest/download/shopware-cli_Linux_x86_64.tar.gz
|
||||
mkdir -p /tmp/swcli-extract
|
||||
tar -xzf /tmp/shopware-cli.tar.gz -C /tmp/swcli-extract
|
||||
cp /tmp/swcli-extract/shopware-cli /usr/local/bin/shopware-cli
|
||||
|
||||
- name: Validate extension (informational only, does not gate the release)
|
||||
if: steps.version.outputs.skip == 'false'
|
||||
run: shopware-cli extension validate . || true
|
||||
|
||||
- name: Package Store-style zip for the Gitea Release asset
|
||||
if: steps.version.outputs.skip == 'false'
|
||||
run: |
|
||||
shopware-cli extension package . --output-directory .build \
|
||||
--filename "AeonDumpManager-${{ steps.version.outputs.tag }}.zip"
|
||||
|
||||
- name: Build root-level zip for the Composer registry
|
||||
if: steps.version.outputs.skip == 'false'
|
||||
run: git archive --format=zip -o "composer-package-${{ steps.version.outputs.tag }}.zip" "${{ steps.version.outputs.tag }}"
|
||||
|
||||
- name: Create Gitea Release
|
||||
if: steps.version.outputs.skip == 'false'
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
server_url: ${{ env.SERVER_URL }}
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
tag_name: ${{ steps.version.outputs.tag }}
|
||||
name: ${{ steps.version.outputs.tag }}
|
||||
body_path: release-notes.md
|
||||
files: .build/AeonDumpManager-${{ steps.version.outputs.tag }}.zip
|
||||
|
||||
- name: Publish to Composer registry
|
||||
if: steps.version.outputs.skip == 'false'
|
||||
run: |
|
||||
STATUS=$(curl -s -o /tmp/composer-publish.log -w "%{http_code}" \
|
||||
-u "haylan:${{ secrets.RELEASE_TOKEN }}" \
|
||||
-T "composer-package-${{ steps.version.outputs.tag }}.zip" \
|
||||
"https://git.arthurerlich.de/api/packages/haylan/composer")
|
||||
cat /tmp/composer-publish.log
|
||||
if [ "$STATUS" != "201" ] && [ "$STATUS" != "409" ]; then
|
||||
echo "Unexpected HTTP status $STATUS publishing to the Composer registry"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Link Composer package to this repository
|
||||
if: steps.version.outputs.skip == 'false'
|
||||
run: |
|
||||
ENCODED_NAME=$(printf '%s' "${{ steps.version.outputs.package_name }}" | sed 's#/#%2F#g')
|
||||
STATUS=$(curl -s -o /dev/null -w "%{http_code}" -u "haylan:${{ secrets.RELEASE_TOKEN }}" -X POST "https://git.arthurerlich.de/api/v1/packages/haylan/composer/${ENCODED_NAME}/-/link/AeonDumpManager")
|
||||
echo "link status: $STATUS"
|
||||
if [ "$STATUS" != "201" ] && [ "$STATUS" != "400" ]; then
|
||||
echo "::warning::Unexpected status linking the Composer package to this repository (HTTP $STATUS) - not fatal, release already published"
|
||||
fi
|
||||
+41
-14
@@ -7,19 +7,46 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
## [0.0.5] - 2026-09-21
|
||||
|
||||
### Fixed
|
||||
|
||||
- Changed namespace
|
||||
|
||||
## [0.0.4] - 2026-09-21
|
||||
|
||||
### Fixed
|
||||
|
||||
- Published Composer packages are now linked to this repository (previously the release workflow
|
||||
published them without a repository association, so they did not appear under the repo's
|
||||
Packages tab).
|
||||
|
||||
## [0.0.3] - 2026-09-17
|
||||
|
||||
### Added
|
||||
|
||||
- List, create, and delete SQL database dumps from a Settings admin page (nested under Settings, per
|
||||
Shopware's [Add Menu Entry](https://developer.shopware.com/docs/v6.6/guides/plugins/plugins/administration/routing-navigation/add-menu-entry.html)
|
||||
guide) and via `aeon:dump:list`/`aeon:dump:create`/`aeon:dump:remove` console commands.
|
||||
- Dumps are created with `mysqldump`/`mariadb-dump` (auto-detected, with an optional `dumpBinaryName`
|
||||
override), gzip-compressed, and stored in the plugin's private Flysystem mount.
|
||||
- `maxDumps` auto-purges the oldest dump on creation; `retantionDays` purges dumps and stale job rows
|
||||
on a recurring scheduled task.
|
||||
- Admin UI dump creation runs asynchronously via Symfony Messenger with a polling progress bar; console
|
||||
creation runs synchronously.
|
||||
- ACL-gated (`aeon_dump_manager.viewer`/`.creator`/`.deleter`), enforced both client-side and
|
||||
server-side.
|
||||
- Filter the dump list by a from/to date range, and sort the `datetime`/`sizeBytes` columns
|
||||
ascending or descending. Dates are formatted with Shopware's locale/timezone-aware
|
||||
`Shopware.Utils.format.date`, matching the existing `fileSize` formatting.
|
||||
- Filter the dump list by date range and sort by date or size; dates use Shopware's locale-aware
|
||||
formatting.
|
||||
|
||||
## [0.0.2] - 2026-09-21
|
||||
|
||||
### Added
|
||||
|
||||
- Automated release pipeline: a pre-merge check enforcing a semver version bump and a matching
|
||||
CHANGELOG entry on every PR into `main`, and a post-merge workflow that tags the release,
|
||||
packages the plugin with `shopware-cli`, publishes a Gitea Release with the packaged zip, and
|
||||
publishes the package to this Gitea instance's Composer registry.
|
||||
- `main` is now a protected branch: no direct pushes, merges require the version/changelog check
|
||||
to pass.
|
||||
|
||||
## [0.0.1] - 2026-09-15
|
||||
|
||||
### Added
|
||||
|
||||
- List, create, delete, and download gzip-compressed SQL dumps from a Settings admin page (async
|
||||
creation with a polling progress bar) or via the `aeon:dump:list`, `aeon:dump:create`, and
|
||||
`aeon:dump:remove` console commands (sync). Dumps are produced with `mysqldump`/`mariadb-dump`
|
||||
(auto-detected, overridable via `dumpBinaryName`) and stored in the plugin's private filesystem.
|
||||
- Retention controls: `maxDumps` purges the oldest dump when the limit is reached; `retantionDays`
|
||||
purges expired dumps and stale job rows via a scheduled task.
|
||||
- ACL-gated by `aeon_dump_manager.viewer`/`.creator`/`.deleter`, enforced client- and server-side.
|
||||
+4
-4
@@ -1,9 +1,9 @@
|
||||
{
|
||||
"name": "aeon/dump-manager",
|
||||
"name": "arthurerlich/aeon-dump-manager",
|
||||
"description": "Export database dumps for Shopware 6 environments.",
|
||||
"type": "shopware-platform-plugin",
|
||||
"license": "MIT",
|
||||
"version": "0.0.2",
|
||||
"version": "0.0.5",
|
||||
"keywords": [
|
||||
"shopware",
|
||||
"shopware6",
|
||||
@@ -35,8 +35,8 @@
|
||||
"shopware-plugin-class": "AeonDumpManager\\AeonDumpManager",
|
||||
"copyright": "(c) by Arthur Erlich",
|
||||
"label": {
|
||||
"de-DE": "Aeon Dump Manager",
|
||||
"en-GB": "Aeon Dump Manager"
|
||||
"de-DE": "Dump Manager",
|
||||
"en-GB": "Dump Manager"
|
||||
},
|
||||
"description": {
|
||||
"de-DE": "Verwaltet Datenbank-Dumps für Shopware 6 Entwicklungsumgebungen.",
|
||||
|
||||
Reference in new issue
Block a user