zendframework / component-split

Script/utilities for splitting ZF2 components into their own repositories.
17 stars 7 forks source link

try split "Authentication" component got Invalid component name 'Authentication' #2

Closed samsonasik closed 9 years ago

samsonasik commented 9 years ago

I've tried run :

$ ./bin/split-component.sh \
> -c Authentication \
> -t TestConfiguration.php.dist \
> -i TestConfiguration.php.travis 2>&1 | tee -a split.log

Got log :

ZF2 Component Split Tool, v0.1.0

Splitting component Authentication
Using:
    PHP:                           /usr/local/php5/bin/php
    ZF2 path:                      zf2-migrate
    TestConfiguration.php.dist:    readlink: illegal option -- f
usage: readlink [-n] [file ...]
    TestConfiguration.php.travis:  readlink: illegal option -- f
usage: readlink [-n] [file ...]

readlink: illegal option -- f
usage: readlink [-n] [file ...]
Cloning into 'zf2-migrate'...
readlink: illegal option -- f
usage: readlink [-n] [file ...]
Invalid component name 'Authentication'!
weierophinney commented 9 years ago

@samsonasik First, thanks for trying! However, it's not quite ready yet!

Second, what shell are you using? I tested in bash and zsh, and those options are standard under those shells. I'm curious what shells might have issues, so I can add that information to the README file.

samsonasik commented 9 years ago

@weierophinney I was using terminal in mac version 2.4 (326)

weierophinney commented 9 years ago

@samsonasik Right, but what shell environment is the default in the Mac terminal? possibilities are ash, csh, tcsh, zsh, bash, ksh, …

samsonasik commented 9 years ago

it seems i am using bash :

$ echo $SHELL
/bin/bash
weierophinney commented 9 years ago

Interesting, and frustrating; I've not run across a bash or zsh that didn't have that flag as part of the readlink() implementation. I'll see if I can find another option for that tomorrow.

weierophinney commented 9 years ago

@samsonasik Can you try changing the -f switches to either -e or -m in your local checkout, and see if either runs? They all do essentially the same thing, with subtle differences in behavior around symlinks (which we're not worried about here). If one works, let me know which one.

samsonasik commented 9 years ago

thank you ;)

samsonasik commented 9 years ago

@weierophinney how to change that ?

samsonasik commented 9 years ago

I have tried :

$ #!/bin/bash -xm

$ ./bin/split-component.sh -c Authentication -t TestConfiguration.php.dist -i TestConfiguration.php.travis 2>&1 | tee -a split.log
ZF2 Component Split Tool, v0.1.0

Splitting component Authentication
Using:
    PHP:                           /usr/local/php5/bin/php
    ZF2 path:                      zf2-migrate
    TestConfiguration.php.dist:    readlink: illegal option -- f
usage: readlink [-n] [file ...]
    TestConfiguration.php.travis:  readlink: illegal option -- f
usage: readlink [-n] [file ...]

readlink: illegal option -- f
usage: readlink [-n] [file ...]
Cloning into 'zf2-migrate'...
readlink: illegal option -- f
usage: readlink [-n] [file ...]
Invalid component name 'Authentication'!

any something i missed?

samsonasik commented 9 years ago

I even try change the code inside bin/split-component.sh with -m and -e and got :

readlink: illegal option -- e
weierophinney commented 9 years ago

@samsonasik I think you'll need to do this in a vagrant box running a linux OS such as ubuntu, fedora, etc. That functionality is used to ensure we have fully qualified paths for tools, utilities, assets, etc. before we descend into the cloned repository. The flags I'm using are standard for modern readlink variants, and I'm having trouble finding any other cross-platform way of doing that that is reliable.

samsonasik commented 9 years ago

@weierophinney i am trying in vagrant, seems it works now, on cloning process now :

$ ./bin/split-component.sh \
> -c Authentication \
> -t TestConfiguration.php.dist \
> -i TestConfiguration.php.travis 2>&1 | tee -a split.log
ZF2 Component Split Tool, v0.1.0

Splitting component Authentication
Using:
    PHP:                           
    ZF2 path:                      zf2-migrate
    TestConfiguration.php.dist:    /home/vagrant/component-split/TestConfiguration.php.dist
    TestConfiguration.php.travis:  /home/vagrant/component-split/TestConfiguration.php.travis

Cloning into 'zf2-migrate'...
weierophinney commented 9 years ago

Cool!

One note: I've already done the authentication component: https://github.com/weierophinney/zend-authentication ; try Stdlib or Mime.

Also, we'll start in earnest next week, after we've released 2.4.1. Right now, I'm doing a limited test with a few community members and my team to work out bugs in the process. Once we're ready to go, I'll be soliciting volunteers, and will have a sign up sheet for people to claim components.

samsonasik commented 9 years ago

Ok, I will try Stdlib. Thanks ;)

samsonasik commented 9 years ago

seems it on process now, but i got following error :

Rewrite 9bbfe6a2bd7997bf5ca62497180d4f7d022757a6 (1/13544)/usr/lib/git-core/git-filter-branch: 2: eval: /home/vagrant/component-split/bin/tree-filter.php: Permission denied
tree filter failed: 
             /home/vagrant/component-split/bin/tree-filter.php                 Stdlib                 /home/vagrant/component-split                                  '(none)'                 '(none)'                 '(none)'                 /home/vagrant/component-split/TestConfiguration.php.dist                 /home/vagrant/component-split/TestConfiguration.php.travis                 '(none)'

Deleted tag 'last-docs-commit' (was b0b7b93)
Deleted tag 'release-2.0.0dev1' (was a3eb9b1)
Deleted tag 'release-2.0.0dev2' (was 795dc48)

should i stop and make tree-filter.php executable and re-execute?

weierophinney commented 9 years ago

It seems it's not finding your php executable; you may need to pass the path to it (look in bin/split-component.sh -h to see what switch to use for that). If you don't have PHP installed on the VM, install it. :)

samsonasik commented 9 years ago

yes, it seems ok now ;)