Skip to content

Commit fb5925f

Browse files
committed
release: v0.7.0
1 parent 6b9a563 commit fb5925f

File tree

11 files changed

+66
-11
lines changed

11 files changed

+66
-11
lines changed

CHANGELOG.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,32 @@ The versions follow the rules of [Semantic Versioning 2.0.0](http://semver.org/s
88

99
## [Unreleased]
1010

11-
[Full Changes](https://github.com/adoyle-h/lobash/compare/master...develop)
11+
[Full Changes](https://github.com/adoyle-h/lobash/compare/v0.7.0...HEAD)
12+
13+
14+
<a name="v0.7.0"></a>
15+
## v0.7.0 (2024-09-06 21:38:01 +08:00)
16+
17+
[Full Changes](https://github.com/adoyle-h/lobash/compare/v0.6.0...v0.7.0)
18+
19+
### New Features
20+
21+
- add module l.array_size ([2b4f2a1](https://github.com/adoyle-h/lobash/commit/2b4f2a1ee2e8854665fc527243004bbc78d74085))
22+
- add module l.parse_args. And l.parse_params is deprecated. ([b506bf5](https://github.com/adoyle-h/lobash/commit/b506bf5f8aa2da8e38f031d484b533d1c0db4e16))
23+
> User should use l.parse_args instead of l.parse_params.
24+
> The l.parse_params has some limitations on use. So it is deprecated and
25+
> will be removed in soon.
26+
- add module l.array_has_key ([00013b0](https://github.com/adoyle-h/lobash/commit/00013b0ddb927902c5069cfa89548f351f602a22))
27+
- add module: is_associative_array ([80f3153](https://github.com/adoyle-h/lobash/commit/80f31539e1360b91132d02db9fe610dad5cef7c8))
28+
- add modules: var_attrs ([b5455e4](https://github.com/adoyle-h/lobash/commit/b5455e45abb7764f742d218700d283423f4d2e07))
29+
30+
### Document Changes
31+
32+
- update docs ([e723a75](https://github.com/adoyle-h/lobash/commit/e723a75f9842a8f2f9f32e996a0e41bb1e56794a))
33+
- update README ([0ab8056](https://github.com/adoyle-h/lobash/commit/0ab8056872f21ec8252a46d517d9a0d6bb6c9be0))
34+
- improve CONTRIBUTING ([784aa24](https://github.com/adoyle-h/lobash/commit/784aa24f4ceafd44e48a0a45ef3110ba506b8018))
35+
- renew license && add CONTRIBUTING in Chinese ([dbd4e6d](https://github.com/adoyle-h/lobash/commit/dbd4e6d15fc649af036b40d57591eca1a6419d33))
36+
- update version in README ([cf8883e](https://github.com/adoyle-h/lobash/commit/cf8883ecb29b7309ec722d327b3ca1d3bd8c4bdc))
1237

1338
<a name="v0.6.0"></a>
1439
## v0.6.0 (2022-12-15 02:35:30 +08:00)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ Lobash helps to reduce the mental burden on developers.
6565
## CI Status
6666

6767
- [develop branch](https://github.com/adoyle-h/lobash/tree/develop): [![CI Status](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=develop)](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Adevelop)
68+
- [v0.7.0](https://github.com/adoyle-h/lobash/tree/v0.7.0): [![CI Status](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.7.0)](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.7.0)
6869
- [v0.6.0](https://github.com/adoyle-h/lobash/tree/v0.6.0): [![CI Status](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.6.0)](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.6.0)
6970
- [v0.5.1](https://github.com/adoyle-h/lobash/tree/v0.5.1): [![CI Status](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.5.1)](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.5.1)
70-
- [v0.5.0](https://github.com/adoyle-h/lobash/tree/v0.5.0): [![CI Status](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.5.0)](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.5.0)
7171

7272
## Versions
7373

@@ -135,7 +135,7 @@ Make sure below dependencies have been installed in your system.
135135
Available Lobash versions refer to [Git Tags](https://github.com/adoyle-h/lobash/tags) which named like "vX.Y.Z".
136136

137137
```sh
138-
VERSION=v0.6.0 # or VERSION=develop, but develop branch is unstable.
138+
VERSION=v0.7.0 # or VERSION=develop, but develop branch is unstable.
139139
# Download source codes
140140
git clone --depth 1 --branch $VERSION https://github.com/adoyle-h/lobash.git
141141
cd lobash

README.zh.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ Lobash 能减少开发者的心智负担。
6464
## CI 状态
6565

6666
- [develop 分支](https://github.com/adoyle-h/lobash/tree/develop): [![CI Status](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=develop)](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Adevelop)
67+
- [v0.7.0](https://github.com/adoyle-h/lobash/tree/v0.7.0): [![CI Status](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.7.0)](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.7.0)
6768
- [v0.6.0](https://github.com/adoyle-h/lobash/tree/v0.6.0): [![CI Status](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.6.0)](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.6.0)
68-
- [v0.5.0](https://github.com/adoyle-h/lobash/tree/v0.5.0): [![CI Status](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.5.0)](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.5.0)
69-
- [v0.4.0](https://github.com/adoyle-h/lobash/tree/v0.4.0): [![CI Status](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.4.0)](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.4.0)
69+
- [v0.5.1](https://github.com/adoyle-h/lobash/tree/v0.5.1): [![CI Status](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml/badge.svg?branch=v0.5.1)](https://github.com/adoyle-h/lobash/actions/workflows/ci.yaml?query=branch%3Av0.5.1)
7070

7171
## 版本
7272

@@ -135,7 +135,7 @@ Bash 4.4 以下版本都有很多 BUG,强烈建议用户升级到 Bash 4.4 以
135135
[Git Tags](https://github.com/adoyle-h/lobash/tags) 中查看 Lobash 的可用版本 ("vX.Y.Z")。
136136

137137
```sh
138-
VERSION=v0.6.0 # 或者 VERSION=develop,但是 develop 分支不稳定
138+
VERSION=v0.7.0 # 或者 VERSION=develop,但是 develop 分支不稳定
139139
# 下载源码
140140
git clone --depth 1 --branch $VERSION https://github.com/adoyle-h/lobash.git
141141
cd lobash

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.6.0
1+
0.7.0

config.example

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ PREFIX: l.
1212
- [ ] sub
1313

1414
- [ ] Array
15+
- [ ] array_has_key
1516
- [ ] array_include
1617
- [ ] array_include.s
1718
- [ ] array_reverse
19+
- [ ] array_size
1820
- [ ] each
1921
- [ ] each.p
2022
- [ ] first

docs/module-usages/README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Module Usages
22

3-
15 Categories, 143 Modules, 802 Test Cases.
3+
15 Categories, 145 Modules, 817 Test Cases.
44

55
Each module provides only one function which naming prefixed with `l.` by default.
66

@@ -23,9 +23,11 @@ Most Lobash modules support Bash 4.0+ except below modules.
2323
- [inc](./arithmetic.md#inc)
2424
- [sub](./arithmetic.md#sub)
2525
- [Array](./array.md)
26+
- [array_has_key](./array.md#array_has_key)
2627
- [array_include](./array.md#array_include)
2728
- [array_include.s](./array.md#array_includes)
2829
- [array_reverse](./array.md#array_reverse)
30+
- [array_size](./array.md#array_size)
2931
- [each](./array.md#each)
3032
- [each.p](./array.md#eachp)
3133
- [first](./array.md#first)

docs/module-usages/array.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
## TOC
66

7+
- [array_has_key](#array_has_key)
78
- [array_include](#array_include)
89
- [array_include.s](#array_includes)
910
- [array_reverse](#array_reverse)
11+
- [array_size](#array_size)
1012
- [each](#each)
1113
- [each.p](#eachp)
1214
- [first](#first)
@@ -20,6 +22,17 @@
2022

2123
## Modules
2224

25+
### array_has_key
26+
27+
- Usage: `l.array_has_key <array_name> <key_name>`
28+
- Description:
29+
- Check key whether defined in array or associative array.
30+
- Return 0 (true) or 1 (false). This function should never throw exception error.
31+
- Since: 0.7.0
32+
- Bash: 4.0+
33+
- Test Cases: [tests/modules/array_has_key.bats](../../tests/modules/array_has_key.bats)
34+
- Source Code: [src/modules/array_has_key.bash](../../src/modules/array_has_key.bash)
35+
2336
### array_include
2437

2538
- Usage: `l.array_include <array_name> <match>`
@@ -56,6 +69,17 @@
5669
- Test Cases: [tests/modules/array_reverse.bats](../../tests/modules/array_reverse.bats)
5770
- Source Code: [src/modules/array_reverse.bash](../../src/modules/array_reverse.bash)
5871

72+
### array_size
73+
74+
- Usage: `l.array_size <array_name>`
75+
- Description:
76+
- Return the actual size of array and associative array
77+
- For `declare -A array=([test]='')`, the `${#array[@]}` is 0, because bash excludes the null value.
78+
- Since: 0.7.0
79+
- Bash: 4.0+
80+
- Test Cases: [tests/modules/array_size.bats](../../tests/modules/array_size.bats)
81+
- Source Code: [src/modules/array_size.bash](../../src/modules/array_size.bash)
82+
5983
### each
6084

6185
- Usage:

docs/module-usages/util.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
- "count": the value of option defaults to 0. And increasing count by times. For example: `-v` `-vv` `-vvv`.
4848
- "kv": key/value. It means the option must has an argument. If user not pass argument to "kv" option. It will print error and stop.
4949
- See test cases for details.
50-
- Dependent: [`each`](./array.md#each) [`match_list`](./string.md#match_list) [`var_attrs`](./variable.md#var_attrs)
50+
- Dependent: [`each`](./array.md#each) [`match_list`](./string.md#match_list) [`var_attrs`](./variable.md#var_attrs) [`array_has_key`](./array.md#array_has_key)
5151
- Since: 0.7.0
5252
- Bash: 4.0+
5353
- **Notice**: **Only with bash 4.3, there may be something wrong if opts and args are not array.**

src/internals/categories/array

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
array_has_key
12
array_include
23
array_include.s
34
array_reverse
5+
array_size
46
each
57
each.p
68
first

src/modules/array_has_key.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ---
22
# Category: Array
3-
# Since: next
3+
# Since: 0.7.0
44
# Usage: l.array_has_key <array_name> <key_name>
55
# Description: Check key whether defined in array or associative array.
66
# Description: Return 0 (true) or 1 (false). This function should never throw exception error.

0 commit comments

Comments
 (0)