2017 © Pedro Peláez
 

library composer-version-handler

Composer script to automates the process of updating an application version number

image

juliendufresne/composer-version-handler

Composer script to automates the process of updating an application version number

  • Sunday, May 1, 2016
  • by JulienDufresne
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4,064 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 2 % Grown

The README.md

Automating an application version number with Composer

Usage

Add the following in your root composer.json file:, (*1)

{
    "require": {
        "juliendufresne/composer-version-handler": "^1.0"
    },
    "scripts": {
        "post-install-cmd": [
            "JulienDufresne\\VersionHandler\\ScriptHandler::updateVersion"
        ],
        "post-update-cmd": [
            "JulienDufresne\\VersionHandler\\ScriptHandler::updateVersion"
        ]
    },
    "extra": {
        "juliendufresne-version": {
            "file": "app/config/parameters.yml",
            "parameter-key": "parameters.app_version",
            "strategies": ["git", "incremental"]
        }
    }
}

The parameters.app_version will then be updated according to the first strategy able to deliver a version number., (*2)

Strategies

Git

If the current revision corresponds to a git tag, the git strategy will use this tag as a version., (*3)

Incremental

The incremental strategy increment the version by 1. This strategy requires the version to end with a number. If there is no current version, the next version is set to 1., (*4)

Ex: if the current version is v10, then this strategy will set the new version to v12, (*5)

The Versions

01/05 2016

dev-master

9999999-dev

Composer script to automates the process of updating an application version number

  Sources   Download

MIT

The Requires

 

The Development Requires

by Julien Dufresne

01/05 2016

v1.0.1

1.0.1.0

Composer script to automates the process of updating an application version number

  Sources   Download

MIT

The Requires

 

The Development Requires

by Julien Dufresne

30/04 2016

v1.0.0

1.0.0.0

Composer script to automates the process of updating an application version number

  Sources   Download

MIT

The Requires

 

The Development Requires

by Julien Dufresne