Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > it.comp.www.php > #21701 > unrolled thread
| Started by | Simonex <simo@sumo.it> |
|---|---|
| First post | 2017-09-07 17:43 +0200 |
| Last post | 2017-09-11 09:08 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to it.comp.www.php
composer: escludere directory Simonex <simo@sumo.it> - 2017-09-07 17:43 +0200
Re: composer: escludere directory Alessandro Pellizzari <shuriken@amiran.it> - 2017-09-08 10:39 +0100
Re: composer: escludere directory Simonex <simo@sumo.it> - 2017-09-08 17:56 +0200
Re: composer: escludere directory Simonex <simo@sumo.it> - 2017-09-11 09:08 +0200
| From | Simonex <simo@sumo.it> |
|---|---|
| Date | 2017-09-07 17:43 +0200 |
| Subject | composer: escludere directory |
| Message-ID | <oorpfq$1v1i$1@gioia.aioe.org> |
Nella dir del mio progetto, oltre a composer.json, ho creato anche il file .gitattributes. Al suo interno ci ho messo docs/ export-ignore tests/ export-ignore Così se do il comando composer require simonex/test dovrebbero scaricarsi tutte le subdir, tranne docs e tests. Invece vengono incluse ugualmente. Perchè?
[toc] | [next] | [standalone]
| From | Alessandro Pellizzari <shuriken@amiran.it> |
|---|---|
| Date | 2017-09-08 10:39 +0100 |
| Message-ID | <f1f6q8F99hdU1@mid.individual.net> |
| In reply to | #21701 |
On 07/09/2017 16:43, Simonex wrote: > Nella dir del mio progetto, oltre a composer.json, ho creato anche il > file .gitattributes. > ... > composer require simonex/test > > dovrebbero scaricarsi tutte le subdir, tranne docs e tests. > Invece vengono incluse ugualmente. Non conoscevo questa possibilità, ma leggendo al volo le docs di composer, se installi la versione "dist" rispetta i gitattributes, altrimenti (se installi la "dev") li ignora. Puoi forzare di non ignorarle usando --prefer-dist, oppure specificare nella versione del tuo pacchetto che è stable (tipo "1.0.0-stable"). Se non lop fai, composer cerca di fare auto-detect. Le regole per l'auto-detect di dev e stable sono qui: https://getcomposer.org/doc/articles/versions.md#stability-constraints Bye.
[toc] | [prev] | [next] | [standalone]
| From | Simonex <simo@sumo.it> |
|---|---|
| Date | 2017-09-08 17:56 +0200 |
| Message-ID | <ooueil$ei5$1@gioia.aioe.org> |
| In reply to | #21703 |
Il 08/09/2017 11:39, Alessandro Pellizzari ha scritto:
>
> Non conoscevo questa possibilità, ma leggendo al volo le docs di
> composer, se installi la versione "dist" rispetta i gitattributes,
> altrimenti (se installi la "dev") li ignora.
Come si installa la dist?
Quali sono le caratteristiche di questa versione (in due parole)?
> Puoi forzare di non ignorarle usando --prefer-dist, oppure specificare
> nella versione del tuo pacchetto che è stable (tipo "1.0.0-stable").
+ rm -rf vendor
+ cat /mnt/storage/pending/ignore_paths/composer.json
{
"name": "root/ignore_paths",
"version": "1.1.1-stable"
}
+ cat /mnt/storage/pending/ignore_paths/.gitattributes
docs/ export-ignore
tests/ export-ignore
+ cat composer.json
{
"repositories": [
{
"type": "path",
"url": "/mnt/storage/pending/ignore_paths"
}
],
"require": {
"root/ignore_paths": "^1.1"
}
}
+ composer --prefer-dist update
...
+ ls -l vendor/root/ignore_paths/
totale 5
-rwxrwxrwx 1 root root 67 set 8 17:35 composer.json
drwxrwxrwx 1 root root 4096 set 8 17:13 docs
drwxrwxrwx 1 root root 0 set 8 17:13 src
drwxrwxrwx 1 root root 0 set 8 17:13 tests
Sembra che scarica tutto :(
[toc] | [prev] | [next] | [standalone]
| From | Simonex <simo@sumo.it> |
|---|---|
| Date | 2017-09-11 09:08 +0200 |
| Message-ID | <op5cq1$1ipa$1@gioia.aioe.org> |
| In reply to | #21709 |
Il 08/09/2017 17:56, Simonex ha scritto: > > Sembra che scarica tutto :( Niente? Almeno si può sapere se il file .gitattributes viene preso in considerazione?
[toc] | [prev] | [standalone]
Back to top | Article view | it.comp.www.php
csiph-web