Skip to content

Commit

Permalink
release: v0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
adoyle-h committed Sep 6, 2024
1 parent 5a42430 commit 32c768b
Show file tree
Hide file tree
Showing 11 changed files with 66 additions and 11 deletions.
27 changes: 26 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,32 @@ The versions follow the rules of [Semantic Versioning 2.0.0](http://semver.org/s

## [Unreleased]

[Full Changes](https://github.com/adoyle-h/lobash/compare/master...develop)
[Full Changes](https://github.com/adoyle-h/lobash/compare/v0.7.0...HEAD)


<a name="v0.7.0"></a>
## v0.7.0 (2024-09-06 21:38:01 +08:00)

[Full Changes](https://github.com/adoyle-h/lobash/compare/v0.6.0...v0.7.0)

### New Features

- add module l.array_size ([2b4f2a1](https://github.com/adoyle-h/lobash/commit/2b4f2a1ee2e8854665fc527243004bbc78d74085))
- add module l.parse_args. And l.parse_params is deprecated. ([b506bf5](https://github.com/adoyle-h/lobash/commit/b506bf5f8aa2da8e38f031d484b533d1c0db4e16))
> User should use l.parse_args instead of l.parse_params.
> The l.parse_params has some limitations on use. So it is deprecated and
> will be removed in soon.
- add module l.array_has_key ([00013b0](https://github.com/adoyle-h/lobash/commit/00013b0ddb927902c5069cfa89548f351f602a22))
- add module: is_associative_array ([80f3153](https://github.com/adoyle-h/lobash/commit/80f31539e1360b91132d02db9fe610dad5cef7c8))
- add modules: var_attrs ([b5455e4](https://github.com/adoyle-h/lobash/commit/b5455e45abb7764f742d218700d283423f4d2e07))

### Document Changes

- update docs ([e723a75](https://github.com/adoyle-h/lobash/commit/e723a75f9842a8f2f9f32e996a0e41bb1e56794a))
- update README ([0ab8056](https://github.com/adoyle-h/lobash/commit/0ab8056872f21ec8252a46d517d9a0d6bb6c9be0))
- improve CONTRIBUTING ([784aa24](https://github.com/adoyle-h/lobash/commit/784aa24f4ceafd44e48a0a45ef3110ba506b8018))
- renew license && add CONTRIBUTING in Chinese ([dbd4e6d](https://github.com/adoyle-h/lobash/commit/dbd4e6d15fc649af036b40d57591eca1a6419d33))
- update version in README ([cf8883e](https://github.com/adoyle-h/lobash/commit/cf8883ecb29b7309ec722d327b3ca1d3bd8c4bdc))

<a name="v0.6.0"></a>
## v0.6.0 (2022-12-15 02:35:30 +08:00)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ Lobash helps to reduce the mental burden on developers.
## CI Status

- [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)
- [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)
- [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)
- [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)
- [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)

## Versions

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

```sh
VERSION=v0.6.0 # or VERSION=develop, but develop branch is unstable.
VERSION=v0.7.0 # or VERSION=develop, but develop branch is unstable.
# Download source codes
git clone --depth 1 --branch $VERSION https://github.com/adoyle-h/lobash.git
cd lobash
Expand Down
6 changes: 3 additions & 3 deletions README.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ Lobash 能减少开发者的心智负担。
## CI 状态

- [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)
- [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)
- [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)
- [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)
- [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)
- [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)

## 版本

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

```sh
VERSION=v0.6.0 # 或者 VERSION=develop,但是 develop 分支不稳定
VERSION=v0.7.0 # 或者 VERSION=develop,但是 develop 分支不稳定
# 下载源码
git clone --depth 1 --branch $VERSION https://github.com/adoyle-h/lobash.git
cd lobash
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.6.0
0.7.0
2 changes: 2 additions & 0 deletions config.example
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ PREFIX: l.
- [ ] sub

- [ ] Array
- [ ] array_has_key
- [ ] array_include
- [ ] array_include.s
- [ ] array_reverse
- [ ] array_size
- [ ] each
- [ ] each.p
- [ ] first
Expand Down
4 changes: 3 additions & 1 deletion docs/module-usages/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Module Usages

15 Categories, 143 Modules, 802 Test Cases.
15 Categories, 145 Modules, 817 Test Cases.

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

Expand All @@ -23,9 +23,11 @@ Most Lobash modules support Bash 4.0+ except below modules.
- [inc](./arithmetic.md#inc)
- [sub](./arithmetic.md#sub)
- [Array](./array.md)
- [array_has_key](./array.md#array_has_key)
- [array_include](./array.md#array_include)
- [array_include.s](./array.md#array_includes)
- [array_reverse](./array.md#array_reverse)
- [array_size](./array.md#array_size)
- [each](./array.md#each)
- [each.p](./array.md#eachp)
- [first](./array.md#first)
Expand Down
24 changes: 24 additions & 0 deletions docs/module-usages/array.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@

## TOC

- [array_has_key](#array_has_key)
- [array_include](#array_include)
- [array_include.s](#array_includes)
- [array_reverse](#array_reverse)
- [array_size](#array_size)
- [each](#each)
- [each.p](#eachp)
- [first](#first)
Expand All @@ -20,6 +22,17 @@

## Modules

### array_has_key

- Usage: `l.array_has_key <array_name> <key_name>`
- Description:
- Check key whether defined in array or associative array.
- Return 0 (true) or 1 (false). This function should never throw exception error.
- Since: 0.7.0
- Bash: 4.0+
- Test Cases: [tests/modules/array_has_key.bats](../../tests/modules/array_has_key.bats)
- Source Code: [src/modules/array_has_key.bash](../../src/modules/array_has_key.bash)

### array_include

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

### array_size

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

### each

- Usage:
Expand Down
2 changes: 1 addition & 1 deletion docs/module-usages/util.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
- "count": the value of option defaults to 0. And increasing count by times. For example: `-v` `-vv` `-vvv`.
- "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.
- See test cases for details.
- Dependent: [`each`](./array.md#each) [`match_list`](./string.md#match_list) [`var_attrs`](./variable.md#var_attrs)
- 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)
- Since: 0.7.0
- Bash: 4.0+
- **Notice**: **Only with bash 4.3, there may be something wrong if opts and args are not array.**
Expand Down
2 changes: 2 additions & 0 deletions src/internals/categories/array
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
array_has_key
array_include
array_include.s
array_reverse
array_size
each
each.p
first
Expand Down
2 changes: 1 addition & 1 deletion src/modules/array_has_key.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ---
# Category: Array
# Since: next
# Since: 0.7.0
# Usage: l.array_has_key <array_name> <key_name>
# Description: Check key whether defined in array or associative array.
# Description: Return 0 (true) or 1 (false). This function should never throw exception error.
Expand Down
2 changes: 1 addition & 1 deletion src/modules/array_size.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ---
# Category: Array
# Since: next
# Since: 0.7.0
# Usage: l.array_size <array_name>
# Description: Return the actual size of array and associative array
# Description: For `declare -A array=([test]='')`, the `${#array[@]}` is 0, because bash excludes the null value.
Expand Down

0 comments on commit 32c768b

Please sign in to comment.