PHP code example of neilmasters / semanticreleases
1. Go to this page and download the library: Download neilmasters/semanticreleases library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
neilmasters / semanticreleases example snippets
$versioning = new \SemanticReleases\Util\Versioning();
$versioning->getIncreasedVersion('1.0.0'); // $increaseType defaults to major bump 2.0.0
$versioning->getIncreasedVersion('1.0.0', \SemanticReleases\Util\Versioning::MINOR); // 1.1.0
$versioning->getIncreasedVersion('1.0.0', \SemanticReleases\Util\Versioning::FIX); // 1.0.1
$versioning = new \SemanticReleases\Util\Versioning();
$versioning->getIncreasedVersion(1); // 2.0.0
$versioning->getIncreasedVersion(1.1); // 2.0.0
$versioning->getIncreasedVersion('a'); // 1.0.0
$versioning->getIncreasedVersion('a.b'); // 1.0.0
$versioning->getIncreasedVersion('a.b.c'); // 1.0.0