This package is abandoned and no longer maintained. The author suggests using the plista/updep package instead.

Plista UpDep - a bash tool to make the process of updating Composer dependencies automated

Maintainers

Details

github.com/plista/updep

Source

Issues

Installs: 257

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 7

Forks: 0

Open Issues: 1

Language:Shell

2.0.0 2016-10-10 12:21 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:59:42 UTC


README

Plista UpDep is a console tool to ease maintaining projects which widely use Composer for managing dependencies.

UpDep updates dependencies, commits and pushes them in a separate branch. This workflow is often lacked in continously built systems.

Requirements

  1. UpDep uses Bash scripting language.
  2. UpDep is only tested in Linux.
  3. UpDep maintains only projects that have Composer installed and configured.
  4. In the current implementation UpDep requires the "composer-changelogs" plugin to be installed in your Composer.

Installation

Installation via Composer

  1. Add plista/updep as a dependency to your project's composer.json file (change version to suit your version of Plista UpDep):

        {
            "require": {
                "plista/updep": "~2.0"
            }
        }
  2. Download and install Composer:

        curl -s http://getcomposer.org/installer | php
  3. Install your dependencies:

        php composer install --no-dev
  4. Run the program from your project as

        ./vendor/bin/updep.sh

Installation via downloading

  1. Download this repository and put to a folder you would like to execute the tool from.
  2. Properly configure Composer and the "composer-changelogs" plugin in your project.
  3. Go to the parent directory of your project (the one you want to use Plista UpDep for) where composer.lock is located.
  4. Run as a bash script:
        /path/to/updep/bin/updep.sh``

Usage

Usage:
  updep.sh [options]

Options:
  -h, --help                     Display this help message
  -V, --version                  Display this application version
  --composer                     Use this as a fully-qualified Composer execution command
                                 Example: "php /usr/local/bin/composer.phar"
                                 If not set the default global "composer" command will be used
  -n, --no-check                 Do not check availability before execution. It makes the program faster
                                 For instance, it will omit the checking if Composer can be executed.
                                 Use this mode in predefined scripts where you do not expect such errors. 
  -p, --push                     Do not ask for confirmation to push the branch with updates
  -t, --notags                   Do not use hashtags in the commit message subject

What does Plista UpDep do

UpDep executes the following actions step-by-step:

1. Preparing repository

git checkout next
git pull

2. Installing already linked dependencies

composer install

3. Updating dependencies

composer update

4. Checking out a branch for a merge request

git checkout -b ap/update_deps_20160513_1620

5. Commiting composer.lock

git commit -m "Update dependencies ..." ./composer.lock

6. Pushing the changes to origin

At this step UpDep will prompt you if you're ready to push the changes. So if have noticed any problems at this step you can stop and avoid making your changes public. Git will remain on the just created branch.

Propmpting to proceed with pushing can be disabled with "--push" command line option.

git push

7. Switching back to the branch 'next'

git checkout next

8. Rolling back dependencies to synchronize the installation with 'next'

composer install

Authors

UpDep is developed in plista GmbH.

License

UpDep is licensed under the Apache 2.0 License - see the LICENSE file for details.

Acknowledgments