File tree 10 files changed +19
-6
lines changed
10 files changed +19
-6
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,13 @@ jobs:
13
13
strategy :
14
14
fail-fast : true
15
15
matrix :
16
- php : [8.0 ]
16
+ php : [8.1 ]
17
17
18
18
steps :
19
19
- name : Checkout
20
20
uses : actions/checkout@v3
21
+ with :
22
+ fetch-depth : 0
21
23
22
24
- name : Set ENV for github-release
23
25
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
48
50
id : changelog
49
51
run : |
50
52
wget -c -q https://github.com/inhere/kite/releases/latest/download/kite.phar
51
- php kite.phar git cl prev last --style gh-release --no-merges --fetch-tags --unshallow -- file changelog.md
53
+ php kite.phar git cl prev last --style gh-release --no-merges --fetch-tags --file changelog.md
52
54
cat changelog.md
53
55
54
56
# https://github.com/softprops/action-gh-release
Original file line number Diff line number Diff line change @@ -37,6 +37,11 @@ Generic PHP command line flags parse library
37
37
- Support binding named arguemnt
38
38
- Support define array argument
39
39
40
+ ### Quick build command
41
+
42
+ - Use ` Toolkit\PFlag\CliCmd ` to quickly build a simple command application
43
+ - Use ` Toolkit\PFlag\CliApp ` to quickly build a command application that supports subcommands
44
+
40
45
## Install
41
46
42
47
- Require PHP 8.0+
Original file line number Diff line number Diff line change 38
38
- 支持绑定命名参数
39
39
- 支持定义数组参数
40
40
41
+ ### 快速构建命令
42
+
43
+ - 使用 ` Toolkit\PFlag\CliCmd ` 可以快速的构建一个简单的命令应用
44
+ - 使用 ` Toolkit\PFlag\CliApp ` 可以快速的构建一个支持子命令的命令应用
45
+
41
46
## 安装
42
47
43
48
- Require PHP 8.0+
Original file line number Diff line number Diff line change 16
16
17
17
// run demo:
18
18
// php example/cliapp.php
19
-
19
+ // php example/cliapp.php test2 -h
20
20
$ cli = CliApp::newWith (static function (CliApp $ app ): void {
21
21
$ app ->setName ('myApp ' );
22
22
$ app ->setDesc ('my cli application. v1.0.1 ' );
Original file line number Diff line number Diff line change 14
14
require dirname (__DIR__ ) . '/test/bootstrap.php ' ;
15
15
16
16
// run demo:
17
- // php example/clicmd.php
17
+ // php example/clicmd.php -h
18
18
// php example/clicmd.php --name inhere value1
19
19
// php example/clicmd.php --age 23 --name inhere value1
20
20
Original file line number Diff line number Diff line change 19
19
require dirname (__DIR__ ) . '/test/bootstrap.php ' ;
20
20
21
21
// run demo:
22
- // php example/flag -demo.php -h
23
- // php example/sflags -demo.php --name inhere --age 99 --tag go -t php -t java -f arg0 arr0 arr1
22
+ // php example/flags -demo.php -h
23
+ // php example/flags -demo.php --name inhere --age 99 --tag go -t php -t java -f arg0 arr0 arr1
24
24
$ flags = $ _SERVER ['argv ' ];
25
25
// NOTICE: must shift first element.
26
26
$ scriptFile = array_shift ($ flags );
Original file line number Diff line number Diff line change 15
15
require dirname (__DIR__ ) . '/test/bootstrap.php ' ;
16
16
17
17
// run demo:
18
+ // php example/sflags-demo.php -h
18
19
// php example/sflags-demo.php --name inhere --age 99 --tag go -t php -t java -f arg0 arr0 arr1
19
20
$ flags = $ _SERVER ['argv ' ];
20
21
// NOTICE: must shift first element.
You can’t perform that action at this time.
0 commit comments