Compare commits

..
2 Commits
Author SHA1 Message Date
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 47 additions and 35 deletions

No files matched your search

+2 -2
View File
@@ -97,8 +97,8 @@ jobs:
-x "${PLUGIN_NAME}/notes.*" \ -x "${PLUGIN_NAME}/notes.*" \
-x "${PLUGIN_NAME}/*.po~" \ -x "${PLUGIN_NAME}/*.po~" \
-x "${PLUGIN_NAME}/*.bak" \ -x "${PLUGIN_NAME}/*.bak" \
-x "${PLUGIN_NAME}/vendor/*/.git/*" \ -x "${PLUGIN_NAME}/lib/*/.git/*" \
-x "${PLUGIN_NAME}/vendor/*/CLAUDE.md" \ -x "${PLUGIN_NAME}/lib/*/CLAUDE.md" \
-x "*.DS_Store" \ -x "*.DS_Store" \
-x "*Thumbs.db" -x "*Thumbs.db"
+1 -4
View File
@@ -3,10 +3,7 @@
Thumbs.db Thumbs.db
# Composer # Composer
/vendor/* /vendor/
!/vendor/magdev/
/vendor/magdev/*
!/vendor/magdev/wc-licensed-product-client/
composer.lock composer.lock
# Twig cache # Twig cache
+3 -3
View File
@@ -1,3 +1,3 @@
[submodule "vendor/magdev/wc-licensed-product-client"] [submodule "lib/wc-licensed-product-client"]
path = vendor/magdev/wc-licensed-product-client path = lib/wc-licensed-product-client
url = ssh://git@src.bundespruefstelle.ch:2022/magdev/wc-licensed-product-client.git url = ../wc-licensed-product-client.git
+28 -19
View File
@@ -83,8 +83,9 @@ wc-tier-and-package-prices/
│ ├── *.pot # Translation template │ ├── *.pot # Translation template
│ ├── *.po # Translation sources │ ├── *.po # Translation sources
│ └── *.mo # Compiled translations │ └── *.mo # Compiled translations
├── vendor/ # Composer dependencies ├── lib/ # Bundled libraries (git submodules)
│ └── magdev/wc-licensed-product-client/ # License client (git submodule) │ └── wc-licensed-product-client/ # License client library (v0.2.x)
├── vendor/ # Composer dependencies (generated)
├── releases/ # Release packages (not in git) ├── releases/ # Release packages (not in git)
└── *.md # Documentation files └── *.md # Documentation files
@@ -407,19 +408,22 @@ git checkout dev
### Git Submodule: wc-licensed-product-client ### 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:** **Updating the submodule:**
```bash ```bash
# Update to latest commit # Update to a specific tag
cd vendor/magdev/wc-licensed-product-client cd lib/wc-licensed-product-client
git pull origin main git fetch --tags
cd ../../.. git checkout v0.2.3 # or desired version
git add vendor/magdev/wc-licensed-product-client cd ../..
git commit -m "Update wc-licensed-product-client submodule" git add lib/wc-licensed-product-client
git commit -m "Update wc-licensed-product-client to v0.2.3"
``` ```
**Composer Configuration:** **Composer Configuration:**
@@ -429,16 +433,17 @@ git commit -m "Update wc-licensed-product-client submodule"
"repositories": [ "repositories": [
{ {
"type": "path", "type": "path",
"url": "vendor/magdev/wc-licensed-product-client", "url": "lib/wc-licensed-product-client"
"options": { "symlink": false }
} }
], ],
"require": { "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) ### Manual Release (Legacy)
For manual releases without CI/CD, run from the **parent directory**: 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 - Publishes release to Gitea with changelog notes
2. Added git submodule for license client: 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 - Avoids private repository authentication during CI/CD
- Updated `.gitignore` to allow submodule path
- Updated `composer.json` to use path repository
3. Updated documentation: 3. Updated documentation:
- README.md - Added CI/CD section, updated file structure - 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:** **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 - Git submodules require `submodules: recursive` in checkout action
- Composer path repository with `symlink: false` works with submodules - Composer creates symlink from `vendor/` to `lib/` automatically
- `.gitignore` patterns: Use `/vendor/*` then `!/vendor/magdev/` to allow specific paths
- When adding submodules to ignored paths, use `git submodule add -f` to force
**CI/CD Pipeline Notes:** **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 - Required secret: `SRC_GITEA_TOKEN` for Gitea API access
- Uses `shivammathur/setup-php@v2` for PHP setup - Uses `shivammathur/setup-php@v2` for PHP setup
- Uses `actions/checkout@v4` with `submodules: recursive` - 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.pot # Translation template
│ ├── wc-tier-package-prices-*.po # Translation sources │ ├── wc-tier-package-prices-*.po # Translation sources
│ └── wc-tier-package-prices-*.mo # Compiled translations │ └── wc-tier-package-prices-*.mo # Compiled translations
├── vendor/ # Composer dependencies ├── lib/ # Bundled libraries (git submodules)
│ └── magdev/wc-licensed-product-client/ # License client (git submodule) │ └── wc-licensed-product-client/ # License client library
├── vendor/ # Composer dependencies (generated)
├── CHANGELOG.md # Complete version history ├── CHANGELOG.md # Complete version history
├── INSTALLATION.md # Installation guide ├── INSTALLATION.md # Installation guide
├── QUICKSTART.md # Quick start guide ├── QUICKSTART.md # Quick start guide
+10 -5
View File
@@ -13,20 +13,25 @@
"repositories": [ "repositories": [
{ {
"type": "path", "type": "path",
"url": "vendor/magdev/wc-licensed-product-client", "url": "lib/wc-licensed-product-client"
"options": {
"symlink": false
}
} }
], ],
"require": { "require": {
"php": ">=8.3", "php": ">=8.3",
"twig/twig": "^3.0", "twig/twig": "^3.0",
"magdev/wc-licensed-product-client": "@dev" "magdev/wc-licensed-product-client": "^0.2"
}, },
"autoload": { "autoload": {
"classmap": [ "classmap": [
"includes/" "includes/"
] ]
},
"config": {
"optimize-autoloader": true,
"platform": {
"php": "8.3.0"
} }
},
"minimum-stability": "stable",
"prefer-stable": true
} }
File renamed without changes.