PHPackages                             ixnode/bash-version-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. ixnode/bash-version-manager

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

ixnode/bash-version-manager
===========================

Bash Version Manager

0.1.10(1y ago)11.0k19MITShellPHP ^8.0

Since Dec 18Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ixnode/bash-version-manager)[ Packagist](https://packagist.org/packages/ixnode/bash-version-manager)[ RSS](/packages/ixnode-bash-version-manager/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (4)Versions (10)Used By (19)

BashVersionManager
==================

[](#bashversionmanager)

This tool helps you to *maintain* the versions in the current path. It increments the patch, minor or major version and replaces them in the corresponding files.

Create new `VERSION` file
-------------------------

[](#create-new-version-file)

The `VERSION` file is used as the source for the version number. A missing file can be created automatically.

```
❯ bin/version-manager --current

[2022-01-16 16:51:41] (error)   → Version file "~/ixno/bash-version-manager/VERSION" not found.

Do you want to create a version file "VERSION" with version "0.1.0"? y

[2022-01-16 16:51:43] (error)   → Version file "~/ixno/bash-version-manager/VERSION" successfully created.
```

Optional: Create `.env` file
----------------------------

[](#optional-create-env-file)

Currently, the variable `VERSION_APP` can be replaced in the `.env` file:

```
❯ cat  .env
# Version of this app
VERSION_APP=$(cat VERSION)

# Version of this app
VERSION_APP_LATEST=latest
EOT
```

Show current version
--------------------

[](#show-current-version)

If you want to see the current version, use the following command.

```
❯ bin/version-manager --current

Current version: 0.1.0

Next major version: 1.0.0 (Use bin/version-manager --major)
Next minor version: 0.2.0 (Use bin/version-manager --minor)
Next patch version: 0.1.1 (Use bin/version-manager --patch)
```

Switch patch version
--------------------

[](#switch-patch-version)

To change the patch version use the flag `--patch`.

```
❯ bin/version-manager --patch

Current version: 0.1.0
New version:     0.1.1

Do you want to set the new version "0.1.1" (y/n)? y

[2022-01-16 16:57:46] (info)    → Set version "0.1.1" to "~/ixno/bash-version-manager/VERSION"
[2022-01-16 16:57:46] (success) → Done.
[2022-01-16 16:57:46] (info)    → Set version "0.1.1" to "~/ixno/bash-version-manager/.env"
[2022-01-16 16:57:46] (success) → Done.
```

Switch minor version
--------------------

[](#switch-minor-version)

To change the minor version use the flag `--minor`.

```
❯ bin/version-manager --minor

Current version: 0.1.0
New version:     0.2.0

Do you want to set the new version "0.2.0" (y/n)? y

[2022-01-16 16:58:32] (info)    → Set version "0.2.0" to "~/ixno/bash-version-manager/VERSION"
[2022-01-16 16:58:32] (success) → Done.
[2022-01-16 16:58:32] (info)    → Set version "0.2.0" to "~/ixno/bash-version-manager/.env"
[2022-01-16 16:58:32] (success) → Done.
```

Switch major version
--------------------

[](#switch-major-version)

To change the major version use the flag `--major`.

```
❯ bin/version-manager --major

Current version: 0.1.0
New version:     1.0.0

Do you want to set the new version "1.0.0" (y/n)? y

[2022-01-16 16:59:06] (info)    → Set version "1.0.0" to "~/ixno/bash-version-manager/VERSION"
[2022-01-16 16:59:06] (success) → Done.
[2022-01-16 16:59:06] (info)    → Set version "1.0.0" to "~/ixno/bash-version-manager/.env"
[2022-01-16 16:59:06] (success) → Done.
```

Switch to given version
-----------------------

[](#switch-to-given-version)

A custom version (e.g. `1.2.3`) for changing versions can be specified as a parameter.

```
❯ bin/version-manager 1.2.3

Current version: 0.1.0
New version:     1.2.3

Do you want to set the new version "1.2.3" (y/n)? y

[2022-01-16 18:11:41] (info)    → Set version "1.2.3" to "/home/bjoern/Development/ixno/bash-version-manager/VERSION"
[2022-01-16 18:11:41] (success) → Done.
[2022-01-16 18:11:41] (info)    → Set version "1.2.3" to "/home/bjoern/Development/ixno/bash-version-manager/.env"
[2022-01-16 18:11:41] (success) → Done.
```

Use another working directory
-----------------------------

[](#use-another-working-directory)

Usually the tool uses the current working directory. This can be changed.

```
❯ bin/version-manager --working-dir test --current

Current version: 0.2.1

Next major version: 1.0.0 (Use bin/version-manager --major)
Next minor version: 0.3.0 (Use bin/version-manager --minor)
Next patch version: 0.2.2 (Use bin/version-manager --patch)
```

Show help
---------

[](#show-help)

Shows the parameters and arguments of the tool.

```
❯ bin/version-manager --help

version-manager 0.1.0 (2022-01-16) - Björn Hempel

Usage: version-manager [...options] [version]

 -c,    --current                     Shows the current version.

 -X,    --major                       Will increase the major version (x.0.0).
 -m,    --minor                       Will increase the minor version (0.x.0).
 -p,    --patch                       Will increase the patch version (0.0.x).

 -w,    --working-dir                 Sets the current working-dir (default: "~/ixno/bash-version-manager")

 -s,    --show-hints                  Shows some hints.
 -h,    --help                        Shows this help.
 -V,    --version                     Shows the version number.
```

Show git hints
--------------

[](#show-git-hints)

Shows some useful commands for committing to the Git repository.

```
❯ bin/version-manager --show-hints

Now you can do the following:

→ Edit your CHANGELOG.md file

❯ vi CHANGELOG.md

→ Usually version changes are set in the main or master branch

❯ git checkout main && git pull

→ Commit your changes to your repo

❯ git add CHANGELOG.md && git commit -m "Add version $(cat VERSION)" && git push

→ Tag your version

❯ git tag -a "$(cat VERSION)" -m "Version $(cat VERSION)" && git push origin "$(cat VERSION)"
```

Use with PHP Composer
---------------------

[](#use-with-php-composer)

```
composer require --dev ixnode/bash-version-manager
```

```
vendor/bin/version-manager --version
```

```
version-manager 0.1.2 (2022-12-18) - Björn Hempel
```

### `Version` class usage

[](#version-class-usage)

```
use Ixnode\BashVersionManager\Version;
```

```
$versionArray = (new Version())->getAll();
```

Execute tests
-------------

[](#execute-tests)

If you want to make changes, the test mode helps to check the current changes. Test mode uses the files in the test folder:

- `.env` (source file)
- `.env.major` (comparison file with major change)
- `.env.minor` (comparison file with minor change)
- `.env.patch` (comparison file with patch change)
- `VERSION` (source file)
- `VERSION.major` (comparison file with major change)
- `VERSION.minor` (comparison file with minor change)
- `VERSION.patch` (comparison file with patch change)

```
bin/version-manager --test
```

```
[2022-01-16 16:50:57] (info)    → The sha1 keys match (major).
[2022-01-16 16:50:57] (info)    → The sha1 keys match (major).

[2022-01-16 16:50:57] (info)    → The sha1 keys match (minor).
[2022-01-16 16:50:57] (info)    → The sha1 keys match (minor).

[2022-01-16 16:50:57] (info)    → The sha1 keys match (patch).
[2022-01-16 16:50:57] (info)    → The sha1 keys match (patch).

[2022-01-16 16:50:57] (success) → All tests were completed successfully.
```

License
-------

[](#license)

This tool is licensed under the MIT License - see the [LICENSE.md](/LICENSE.md) file for details

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance37

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~90 days

Recently: every ~133 days

Total

9

Last Release

572d ago

PHP version history (2 changes)0.1.2PHP ^7.4 || ^8.0

0.1.4PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/29461791?v=4)[ixnode](/maintainers/ixnode)[@ixnode](https://github.com/ixnode)

---

Top Contributors

[![bjoern-hempel](https://avatars.githubusercontent.com/u/5531245?v=4)](https://github.com/bjoern-hempel "bjoern-hempel (22 commits)")

---

Tags

managersemverversioningsemanticversion

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ixnode-bash-version-manager/health.svg)

```
[![Health](https://phpackages.com/badges/ixnode-bash-version-manager/health.svg)](https://phpackages.com/packages/ixnode-bash-version-manager)
```

###  Alternatives

[nikolaposa/version

Value Object that represents a SemVer-compliant version number.

1407.3M23](/packages/nikolaposa-version)[shivas/versioning-bundle

Symfony application versioning, simple console command to manage version (with providers e.g. git tag) of your application using Semantic Versioning 2.0.0 recommendations

1111.3M1](/packages/shivas-versioning-bundle)[pragmarx/version

Take control over your Laravel app version

5931.2M2](/packages/pragmarx-version)[naneau/semver

A decent, standards-compliant, Semantic Versioning (SemVer) parser and library

73522.7k18](/packages/naneau-semver)[z4kn4fein/php-semver

Semantic Versioning library for PHP. It implements the full semantic version 2.0.0 specification and provides ability to parse, compare, and increment semantic versions along with validation against constraints.

261.7M18](/packages/z4kn4fein-php-semver)[version/version

A library for creating, editing, and comparing semantic versioning numbers.

10673.8k6](/packages/version-version)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
