Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure we use the latest version of the API client #30

Open
3 tasks
ubellavance opened this issue Apr 25, 2017 · 3 comments
Open
3 tasks

Make sure we use the latest version of the API client #30

ubellavance opened this issue Apr 25, 2017 · 3 comments

Comments

@ubellavance
Copy link
Contributor

On some version of Zend Server, the API client (zs-client.phar) was not provided with Zend Server itself. Therefore, this module pushed a version of this file. However, this file is now provided but Zend Server and updated if needed. Also, current Zend Server versions provide zs-client.sh, which is a shell that know which .phar to use depending the situation It would be a good thing to:

  • Push the file for versions that do not provide it
  • Don't push the file for version that do provide it
  • Make sure it is as simple as possible. I think that would mean to push zs-client.sh everywhere so that the same command would be used for all versions
@ubellavance
Copy link
Contributor Author

ubellavance commented May 1, 2017

Zend Server 7 has no .phar and no zs-client.sh. Zend Server 8.5 and 9.x do have both. I think that pushing both zs-clients for ZS7 and do nothing otherwise would be a good solution. Then we would simply always call the zs-client.sh because the zs-client.phar is in different locations.

@ubellavance
Copy link
Contributor Author

ubellavance commented May 1, 2017

zs-client.sh:

#!/bin/sh
. /etc/zce.rc
PHP=$ZCE_PREFIX/bin/php
PHAR_SHARE=$ZCE_PREFIX/share/sdk/zs-client.phar
PHAR_LIB_PATH=`$PHP -r "echo @zend_deployment_library_path('ZendServerSDK');"`
PHAR=$PHAR_LIB_PATH/zs-client.phar
if echo $@ | grep -qE "bootstrapSingleServer|serverAddToCluster|clusterRemoveServer"; then
        PHAR=$PHAR_SHARE
elif [ ! -f $PHAR ]; then
        PHAR=$PHAR_SHARE
fi
$PHP $PHAR "$@"```

@ubellavance
Copy link
Contributor Author

#40, commit 01d7760, make the command be zs-client.sh on Zend Server versions that have it. It looks like this module doesn't overwrite the zs-client.phar file so it is not the end of the world if we push that file anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant