Compare commits

...
4 Commits
Author SHA1 Message Date
magdevandClaude Opus 4.5 a4b84f7e41 Fix: Exclude CLAUDE.md from vendor symlink path
Create Release Package / build-release (push) Successful in 1m4s
Zip follows symlinks, so vendor/magdev/wc-licensed-product-client/CLAUDE.md
was being included. Added exclusions for both lib/ and vendor/magdev/ paths.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 20:33:28 +01:00
magdevandClaude Opus 4.5 2e9c948a07 Remove version field from composer.json
Create Release Package / build-release (push) Failing after 58s
The version field causes composer validate --strict to fail with a warning.
Version is determined by git tags instead.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 19:18:34 +01:00
magdevandClaude Opus 4.5 dd4333bd11 Update documentation for lib/ submodule location
Create Release Package / build-release (push) Failing after 4m44s
- Update file structure in README.md and CLAUDE.md
- Document lib/ directory for git submodules
- Update submodule instructions with relative URL
- Add key learnings about vendor/ vs lib/ conflict

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 19:10:53 +01:00
magdevandClaude Opus 4.5 b909221ae2 Fix CI/CD: Move submodule to lib/ directory like wp-fedistream
- Move submodule from vendor/magdev/ to lib/ to avoid Composer conflicts
- Use relative submodule URL (../wc-licensed-product-client.git)
- Pin submodule to v0.2.2 tag
- Update composer.json with ^0.2 version constraint
- Simplify .gitignore (no vendor exceptions needed)
- Update workflow to exclude lib/.git instead of vendor/.git

Based on working wp-fedistream implementation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 19:09:45 +01:00
7 changed files with 49 additions and 36 deletions

No files matched your search

+4 -2
View File
@@ -97,8 +97,10 @@ jobs:
-x "${PLUGIN_NAME}/notes.*" \
-x "${PLUGIN_NAME}/*.po~" \
-x "${PLUGIN_NAME}/*.bak" \
-x "${PLUGIN_NAME}/vendor/*/.git/*" \
-x "${PLUGIN_NAME}/vendor/*/CLAUDE.md" \
-x "${PLUGIN_NAME}/lib/*/.git/*" \
-x "${PLUGIN_NAME}/lib/*/CLAUDE.md" \
-x "${PLUGIN_NAME}/vendor/magdev/*/.git/*" \
-x "${PLUGIN_NAME}/vendor/magdev/*/CLAUDE.md" \
-x "*.DS_Store" \
-x "*Thumbs.db"
+1 -4
View File
@@ -3,10 +3,7 @@
Thumbs.db
# Composer
/vendor/*
!/vendor/magdev/
/vendor/magdev/*
!/vendor/magdev/wc-licensed-product-client/
/vendor/
composer.lock
# Twig cache
+3 -3
View File
@@ -1,3 +1,3 @@
[submodule "vendor/magdev/wc-licensed-product-client"]
path = vendor/magdev/wc-licensed-product-client
url = ssh://git@src.bundespruefstelle.ch:2022/magdev/wc-licensed-product-client.git
[submodule "lib/wc-licensed-product-client"]
path = lib/wc-licensed-product-client
url = ../wc-licensed-product-client.git
+28 -19
View File
@@ -83,8 +83,9 @@ wc-tier-and-package-prices/
│ ├── *.pot # Translation template
│ ├── *.po # Translation sources
│ └── *.mo # Compiled translations
├── vendor/ # Composer dependencies
│ └── magdev/wc-licensed-product-client/ # License client (git submodule)
├── lib/ # Bundled libraries (git submodules)
│ └── wc-licensed-product-client/ # License client library (v0.2.x)
├── vendor/ # Composer dependencies (generated)
├── releases/ # Release packages (not in git)
└── *.md # Documentation files
@@ -407,19 +408,22 @@ git checkout dev
### Git Submodule: wc-licensed-product-client
The `magdev/wc-licensed-product-client` library is bundled as a git submodule to avoid private repository authentication during CI/CD.
The `magdev/wc-licensed-product-client` library is bundled as a git submodule in `lib/` to avoid private repository authentication during CI/CD and to prevent conflicts with Composer's `vendor/` directory.
**Location:** `vendor/magdev/wc-licensed-product-client/`
**Location:** `lib/wc-licensed-product-client/`
**Submodule URL:** Relative path `../wc-licensed-product-client.git` (works with Gitea CI/CD)
**Updating the submodule:**
```bash
# Update to latest commit
cd vendor/magdev/wc-licensed-product-client
git pull origin main
cd ../../..
git add vendor/magdev/wc-licensed-product-client
git commit -m "Update wc-licensed-product-client submodule"
# Update to a specific tag
cd lib/wc-licensed-product-client
git fetch --tags
git checkout v0.2.3 # or desired version
cd ../..
git add lib/wc-licensed-product-client
git commit -m "Update wc-licensed-product-client to v0.2.3"
```
**Composer Configuration:**
@@ -429,16 +433,17 @@ git commit -m "Update wc-licensed-product-client submodule"
"repositories": [
{
"type": "path",
"url": "vendor/magdev/wc-licensed-product-client",
"options": { "symlink": false }
"url": "lib/wc-licensed-product-client"
}
],
"require": {
"magdev/wc-licensed-product-client": "@dev"
"magdev/wc-licensed-product-client": "^0.2"
}
}
```
Composer creates a symlink in `vendor/magdev/wc-licensed-product-client` pointing to `lib/wc-licensed-product-client`.
### Manual Release (Legacy)
For manual releases without CI/CD, run from the **parent directory**:
@@ -1238,10 +1243,11 @@ The plugin architecture is solid and well-tested. Most bugs arise from:
- Publishes release to Gitea with changelog notes
2. Added git submodule for license client:
- `vendor/magdev/wc-licensed-product-client/` as git submodule
- Initially placed in `vendor/magdev/` - **FAILED** (Composer conflicts)
- Fixed: Moved to `lib/wc-licensed-product-client/` like wp-fedistream
- Uses relative URL `../wc-licensed-product-client.git`
- Pinned to v0.2.2 tag
- Avoids private repository authentication during CI/CD
- Updated `.gitignore` to allow submodule path
- Updated `composer.json` to use path repository
3. Updated documentation:
- README.md - Added CI/CD section, updated file structure
@@ -1249,10 +1255,12 @@ The plugin architecture is solid and well-tested. Most bugs arise from:
**Key Learnings:**
- **CRITICAL:** Git submodules should be in `lib/` NOT `vendor/` to avoid Composer conflicts
- Composer manages `vendor/` directory - don't put submodules there
- Use relative submodule URL (`../repo.git`) for Gitea CI/CD compatibility
- Use version constraint `^0.2` instead of `@dev` for stability
- Git submodules require `submodules: recursive` in checkout action
- Composer path repository with `symlink: false` works with submodules
- `.gitignore` patterns: Use `/vendor/*` then `!/vendor/magdev/` to allow specific paths
- When adding submodules to ignored paths, use `git submodule add -f` to force
- Composer creates symlink from `vendor/` to `lib/` automatically
**CI/CD Pipeline Notes:**
@@ -1260,6 +1268,7 @@ The plugin architecture is solid and well-tested. Most bugs arise from:
- Required secret: `SRC_GITEA_TOKEN` for Gitea API access
- Uses `shivammathur/setup-php@v2` for PHP setup
- Uses `actions/checkout@v4` with `submodules: recursive`
- Modeled after working wp-fedistream implementation
---
+3 -2
View File
@@ -154,8 +154,9 @@ wc-tier-and-package-prices/
│ ├── wc-tier-package-prices.pot # Translation template
│ ├── wc-tier-package-prices-*.po # Translation sources
│ └── wc-tier-package-prices-*.mo # Compiled translations
├── vendor/ # Composer dependencies
│ └── magdev/wc-licensed-product-client/ # License client (git submodule)
├── lib/ # Bundled libraries (git submodules)
│ └── wc-licensed-product-client/ # License client library
├── vendor/ # Composer dependencies (generated)
├── CHANGELOG.md # Complete version history
├── INSTALLATION.md # Installation guide
├── QUICKSTART.md # Quick start guide
+10 -6
View File
@@ -1,7 +1,6 @@
{
"name": "magdev/wc-tier-package-prices",
"description": "WooCommerce plugin for tier pricing and package prices with Twig templates",
"version": "1.4.0",
"type": "wordpress-plugin",
"license": "GPL-2.0-or-later",
"authors": [
@@ -13,20 +12,25 @@
"repositories": [
{
"type": "path",
"url": "vendor/magdev/wc-licensed-product-client",
"options": {
"symlink": false
}
"url": "lib/wc-licensed-product-client"
}
],
"require": {
"php": ">=8.3",
"twig/twig": "^3.0",
"magdev/wc-licensed-product-client": "@dev"
"magdev/wc-licensed-product-client": "^0.2"
},
"autoload": {
"classmap": [
"includes/"
]
},
"config": {
"optimize-autoloader": true,
"platform": {
"php": "8.3.0"
}
},
"minimum-stability": "stable",
"prefer-stable": true
}
File renamed without changes.