Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spartaksun/composer-bump-plugin
Bump composer plugin
https://github.com/spartaksun/composer-bump-plugin
Last synced: 9 days ago
JSON representation
Bump composer plugin
- Host: GitHub
- URL: https://github.com/spartaksun/composer-bump-plugin
- Owner: spartaksun
- Created: 2019-08-18T14:39:10.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-19T16:35:33.000Z (over 5 years ago)
- Last Synced: 2024-11-15T21:42:28.216Z (about 1 month ago)
- Language: PHP
- Homepage:
- Size: 39.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Bump plugin
[![Build Status](https://travis-ci.org/spartaksun/composer-bump-plugin.svg?branch=master)](https://travis-ci.org/spartaksun/composer-bump-plugin)## Install
```bash
composer require-dev spartaksun/composer-bump-plugin
```## Usage
```bash
composer bump
```
After plugin package installed you will be able to call `composer bump` command.
Without any additional arguments it will increment a patch part of version mentioned in composer.json.
Command will also create a backup copy of `composer.json` in `composer.json-backup` file.#### Increment patch part of a version
```bash
composer bump patch
```
For example: 1.0.3 => 1.0.4#### Increment minor part of a version and reset patch
```bash
composer bump minor
```
For example: 1.0.3 => 1.1.0#### Increment major part of a version and reset patch and minor
```bash
composer bump major
```
For example: 1.17.34 => 2.0.0#### Change default indentation in composer.json
```bash
composer bump -i 4
```
This command will change indentation in composer.json to 4 spaces/tabsNex command will increment minor, set indentation to 2 and disable creating of backup file.
```bash
composer bump minor -i 2 no-backup
```## Callbacks
You may optionally specify callbacks scripts in your `composer.json`:
```json
{
"scripts": {
"pre-bump": "./my_script.sh",
"post-bump": "bin/console post:bump"
}
}
```
`pre-bump` script will be called before incrementing a version with argument `--old-version`.`post-bump` script will be called after version is incremented with arguments `--old-version` and `--new-version` added to your script.