diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..61f6600 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +help: + @echo "Please use \`make ' where is one of" + @echo " tag to modify the version and tag" + +tag: + $(if $(TAG),,$(error TAG is not defined. Pass via "make tag TAG=1.22.0")) + @echo Tagging $(TAG) + sed -i '' -e "s/APP_VERSION = '.*'/APP_VERSION = '$(TAG)'/" src/Console/AppFactory.php + php -l src/Console/AppFactory.php + git add -A + git commit -m '$(TAG) release' -n + git tag -s '$(TAG)' -m 'Version $(TAG)' diff --git a/src/Console/AppFactory.php b/src/Console/AppFactory.php index 1b946fa..4cd2320 100644 --- a/src/Console/AppFactory.php +++ b/src/Console/AppFactory.php @@ -8,6 +8,8 @@ final class AppFactory { + private const APP_VERSION = '1.21.0'; + /** * @psalm-suppress UndefinedClass * @var list @@ -21,7 +23,7 @@ final class AppFactory */ public static function create(): Application { - $app = new Application('wsdl-tools', '1.0.0'); + $app = new Application('wsdl-tools', self::APP_VERSION); $app->addCommands([ new Command\FlattenCommand(), new Command\ValidateCommand(),