Skip to content

Commit 2772c34

Browse files
committed
chore: update some preview images and update readme docs
1 parent 315aac6 commit 2772c34

10 files changed

+19
-6
lines changed

.github/workflows/release.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,13 @@ jobs:
1313
strategy:
1414
fail-fast: true
1515
matrix:
16-
php: [8.0]
16+
php: [8.1]
1717

1818
steps:
1919
- name: Checkout
2020
uses: actions/checkout@v3
21+
with:
22+
fetch-depth: 0
2123

2224
- name: Set ENV for github-release
2325
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
@@ -48,7 +50,7 @@ jobs:
4850
id: changelog
4951
run: |
5052
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
5254
cat changelog.md
5355
5456
# https://github.com/softprops/action-gh-release

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ Generic PHP command line flags parse library
3737
- Support binding named arguemnt
3838
- Support define array argument
3939

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+
4045
## Install
4146

4247
- Require PHP 8.0+

README.zh-CN.md

+5
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@
3838
- 支持绑定命名参数
3939
- 支持定义数组参数
4040

41+
### 快速构建命令
42+
43+
- 使用 `Toolkit\PFlag\CliCmd` 可以快速的构建一个简单的命令应用
44+
- 使用 `Toolkit\PFlag\CliApp` 可以快速的构建一个支持子命令的命令应用
45+
4146
## 安装
4247

4348
- Require PHP 8.0+

example/changelog.md

Whitespace-only changes.

example/cliapp.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
// run demo:
1818
// php example/cliapp.php
19-
19+
// php example/cliapp.php test2 -h
2020
$cli = CliApp::newWith(static function (CliApp $app): void {
2121
$app->setName('myApp');
2222
$app->setDesc('my cli application. v1.0.1');

example/clicmd.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
require dirname(__DIR__) . '/test/bootstrap.php';
1515

1616
// run demo:
17-
// php example/clicmd.php
17+
// php example/clicmd.php -h
1818
// php example/clicmd.php --name inhere value1
1919
// php example/clicmd.php --age 23 --name inhere value1
2020

example/flags-demo.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
require dirname(__DIR__) . '/test/bootstrap.php';
2020

2121
// 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
2424
$flags = $_SERVER['argv'];
2525
// NOTICE: must shift first element.
2626
$scriptFile = array_shift($flags);

example/images/cli-cmd-help.png

-3.12 KB
Loading

example/images/flags-demo.png

-30.5 KB
Loading

example/sflags-demo.php

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
require dirname(__DIR__) . '/test/bootstrap.php';
1616

1717
// run demo:
18+
// php example/sflags-demo.php -h
1819
// php example/sflags-demo.php --name inhere --age 99 --tag go -t php -t java -f arg0 arr0 arr1
1920
$flags = $_SERVER['argv'];
2021
// NOTICE: must shift first element.

0 commit comments

Comments
 (0)