Documentation

set-version.php

Table of Contents

Functions

updateFile()  : mixed
Update the content of a file.
updateXmlFile()  : mixed
Update the content of an XML file
initFile()  : mixed
Initialize a file (if it doesn't already exist).
makeVerName()  : string
Render a pretty string for a major/minor version number.
isVersionValid()  : mixed
fatal()  : mixed
parseArgs()  : array<string|int, mixed>

Functions

updateFile()

Update the content of a file.

updateFile(string $file, callable $callback) : mixed
Parameters
$file : string
$callback : callable

Function(string $originalContent) => string $newContent.

updateXmlFile()

Update the content of an XML file

updateXmlFile(string $file, callable $callback) : mixed
Parameters
$file : string
$callback : callable

Function(DOMDocument $dom)

initFile()

Initialize a file (if it doesn't already exist).

initFile(string $file, callable $callback) : mixed
Parameters
$file : string
$callback : callable

Function() => string $newContent.

makeVerName()

Render a pretty string for a major/minor version number.

makeVerName(string $version) : string
Parameters
$version : string

Ex: '5.10.alpha1'

Return values
string

Ex: 'FiveTen'.

isVersionValid()

isVersionValid(mixed $v) : mixed
Parameters
$v : mixed

fatal()

fatal(mixed $error) : mixed
Parameters
$error : mixed

parseArgs()

parseArgs(array<string|int, mixed> $argv) : array<string|int, mixed>
Parameters
$argv : array<string|int, mixed>

Ex: ['myscript.php', '--no-commit', '5.6.7']

Return values
array<string|int, mixed>

Ex: ['scriptFile' => 'myscript.php', 'doCommit' => FALSE, 'newVersion' => '5.6.7', 'releaseDate' => '2039-01-01']


        
On this page

Search results