Giter Club home page Giter Club logo

php-bump-library's Introduction

PHP Library for Project Version Management

Version Stable License

This library provides tasks for automating versioning of your PHP projects.

It allows you to increment the version based on different levels (major, minor, patch, dev, beta, rc), and update version references in various files such as PHP files, README.md, package.json, and readme.txt.

Installation

Run the following command in your project directory:

composer require --dev magicoli/php-bump-library

And add the following script to your composer.json file:

 "scripts": {
    "bump-version": "robo --load-from=vendor/magicoli/php-bump-library/RoboFile.php bump:version"
  }

Usage

composer bump-version [level]

Replace [level] with the desired level of version increment, such as major, minor, patch, rc, beta, or dev. If you ommit it, the default level is patch.

Alternatively, you can run the script directly with the following command:

robo bump:version
# or
robo --load-from=path/to/RoboFile.php bump:version

Make sure to adjust RoboFile.php to the actual path of the file in your project.

About Versioning

Semantic Versioning follows a specific order of version increments:

Development stages (M.m.p-stage):

  • Dev: development versions that are not yet stable or released.
  • Beta: pre-release versions that are closer to the stable release but may still have minor issues.
  • RC: release candidates, which are close to the final release but may require additional testing.

Releases (M.m.p):

  • Patch: backward-compatible bug fixes.
  • Minor: added functionality, still backward-compatible manner.
  • Major: big bada boom.

Note that dev, beta, and rc versions are considered inferior to the normal versions and are typically used in pre-release stages or development cycles: 1.0-dev < 1.0-beta < 1.0-rc < 1.0.

For example, if your version is 1.0.0 and you bump it on the dev level, new version will be 1.0.1-dev (note the pach increment). If you bump the dev to beta, it will keep its main version and become 1.0.1-beta. And if you bump 1.0.1-beta without arguments, the new version will be 1.0.1.

License

This library is licensed under the AGPL-v3 License.

php-bump-library's People

Contributors

magicoli avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.