Closed schmunk42 closed 7 years ago
Retest without github-no-api
, because this is not this feature that cause your problem, but this commit 7f3338b433ca21ae8e8f56d4b5a82f0146242dce.
Now you must add the option asset-pattern-skip-version
with (-patch)
, because the default value is false
now
I think we should put the same behavior for this option that the github-no-api
option, ie: allow to set this option for each package and / or to all packages.
Because, some packages must use the patched versions.
You're right, I've tested it with this:
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
},
"asset-vcs-driver-options": {
"github-no-api": true
},
"asset-pattern-skip-version": "(-patch)"
}
So it's merely a documentation thing, beside the edge-case you mentioned in https://github.com/francoispluchino/composer-asset-plugin/issues/227#issuecomment-225654639
I will review the documentation by adding this feature.
With the new configuration:
{
"extra": {
"asset-pattern-skip-version": "(-patch)"
}
}
or
{
"extra": {
"asset-pattern-skip-version": {
"default": "(-patch)",
"packages": {
"bower-asset/example-asset1": false,
"bower-asset/example-asset2": "(-build)",
}
}
}
}
@schmunk42 I have trying with the last 1.3.0@dev
version of this plugin:
{
"require": {
"bower-asset/angular": "^1.6.0"
},
"extra": {
"asset-vcs-driver-options": {
"github-no-api": true
},
"asset-pattern-skip-version": "(-patch)"
}
}
And the -patch
versions are skipped:
D:\Tests\test79>composer install --prefer-dist -v
Loading composer repositories with package information
Updating dependencies (including require-dev)
Adding VCS repository bower-asset/angular
Reading bower.json of bower-asset/angular (v1.6.0)
Importing tag v1.6.0 (1.6.0.0)
Reading bower.json of bower-asset/angular (v1.6.1)
Importing tag v1.6.1 (1.6.1.0)
Reading bower.json of bower-asset/angular (v1.6.2)
Importing tag v1.6.2 (1.6.2.0)
Dependency resolution completed in 0.000 seconds
Analyzed 70 packages to resolve dependencies
Analyzed 71 rules to resolve dependencies
Package operations: 1 install, 0 updates, 0 removals
Installs: bower-asset/angular:v1.6.2
- Installing bower-asset/angular (v1.6.2) Loading from cache Extracting archive
Writing lock file
Generating autoload files
When running
composer require bower-asset/angular
andno-api
to set totrue
the plugin scans all tags (which are thousands in this repo) instead of just the "real" versions, like currently with the GitHub API.First run no caches filled....
Expected behavior: Scan only
v1.2.17
and notv1.2.17-patchXXX
Related: https://github.com/francoispluchino/composer-asset-plugin/issues/226