Compare commits
4
Commits
d80c9d90f9
...
v1.4.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a4b84f7e41 | ||
|
|
2e9c948a07 | ||
|
|
dd4333bd11 | ||
|
|
b909221ae2 |
No files matched your search
@@ -97,8 +97,10 @@ 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 "${PLUGIN_NAME}/vendor/magdev/*/.git/*" \
|
||||||
|
-x "${PLUGIN_NAME}/vendor/magdev/*/CLAUDE.md" \
|
||||||
-x "*.DS_Store" \
|
-x "*.DS_Store" \
|
||||||
-x "*Thumbs.db"
|
-x "*Thumbs.db"
|
||||||
|
|
||||||
|
|||||||
+1
-4
@@ -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
@@ -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
|
||||||
@@ -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
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
+11
-7
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "magdev/wc-tier-package-prices",
|
"name": "magdev/wc-tier-package-prices",
|
||||||
"description": "WooCommerce plugin for tier pricing and package prices with Twig templates",
|
"description": "WooCommerce plugin for tier pricing and package prices with Twig templates",
|
||||||
"version": "1.4.0",
|
|
||||||
"type": "wordpress-plugin",
|
"type": "wordpress-plugin",
|
||||||
"license": "GPL-2.0-or-later",
|
"license": "GPL-2.0-or-later",
|
||||||
"authors": [
|
"authors": [
|
||||||
@@ -13,20 +12,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.
Reference in new issue
Block a user