We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a4f836f commit 5898b74Copy full SHA for 5898b74
build/release-prepare
@@ -0,0 +1,24 @@
1
+#!/usr/bin/env php
2
+<?php
3
+
4
+$version = $argv[1] ?? '';
5
6
+if (empty($version)) {
7
+ echo "version number is missing\n";
8
+ exit(1);
9
+}
10
11
+$root = realpath(__DIR__ . '/..') . '/';
12
+$file = $root . 'src/CH.php';
13
+$ch = file_get_contents($file);
14
+$date = date('Y-m-d');
15
16
+$ch = preg_replace("~VERSION = '[0-9]+\.[0-9]+.[0-9]';~", "VERSION = '$version';", $ch);
17
+$ch = preg_replace("~RELEASE_DATE = '[0-9]+-[0-9]+-[0-9]+';~", "RELEASE_DATE = '$date';", $ch);
18
19
+file_put_contents($file, $ch);
20
21
+`git add $file`;
22
+`git commit -m'Prepare version $version'`;
23
+`git tag -asm'Version $version' $version`;
24
0 commit comments