Skip to content

Commit 864aa72

Browse files
committed
Merge branch 'release/5.39.0'
2 parents e66c58d + 67d22a6 commit 864aa72

11 files changed

Lines changed: 86 additions & 28 deletions

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,40 @@
22

33
# Changelog
44

5+
## 5.39.0 (2026-03-24)
6+
7+
_Commits from: v5.38.7..HEAD_
8+
9+
### 📂 Unscoped changes
10+
11+
#### Other changes
12+
13+
- Merge tag 'v5.38.0' into develop ([89bf33f](https://github.com/tomgrv/devcontainer-features/commit/89bf33ffb8577dfa4dcdde139c8d52ff3c2c24fb))
14+
- Merge tag 'v5.38.1' into develop ([76413d0](https://github.com/tomgrv/devcontainer-features/commit/76413d0b740863169e76ad9af283571c706b0716))
15+
- Merge tag 'v5.38.2' into develop ([7b1f14b](https://github.com/tomgrv/devcontainer-features/commit/7b1f14b3f4feb41517cf0f84d6e094538723db4c))
16+
- Merge tag 'v5.38.3' into develop ([1a61e91](https://github.com/tomgrv/devcontainer-features/commit/1a61e917ece3ccd6a8e066e93d2371e9a338a382))
17+
- Merge tag 'v5.38.4' into develop ([c7b55fe](https://github.com/tomgrv/devcontainer-features/commit/c7b55fe12e808ad1009f06764b4a4a8ba980926a))
18+
- Merge tag 'v5.38.5' into develop ([7ea28a2](https://github.com/tomgrv/devcontainer-features/commit/7ea28a2fd45eb0b6dd2ddb5fff0315bd2ee2a2cd))
19+
- Merge tag 'v5.38.6' into develop ([3f64400](https://github.com/tomgrv/devcontainer-features/commit/3f64400d096d1eb32ea052a7dd6baae94194d7e1))
20+
- Merge tag 'v5.38.7' into develop ([61267b0](https://github.com/tomgrv/devcontainer-features/commit/61267b03c238249ece036ad3bc71832b57a9c3b4))
21+
22+
### 📦 common-utils changes
23+
24+
#### Bug Fixes
25+
26+
- 🐛 update argument prefix for params in dispatch utility ([b652d6e](https://github.com/tomgrv/devcontainer-features/commit/b652d6ed7bedb6ffe5691f658365b9ff62de684a))
27+
- 🐛 update argument processing for '=' and '+' parameters ([7820242](https://github.com/tomgrv/devcontainer-features/commit/7820242a71aab64bf5ab92b31fa6844bade179aa))
28+
29+
### 📦 gitutils changes
30+
31+
#### Bug Fixes
32+
33+
- 🐛 add stash option to handle uncommitted changes before hotfix ([c48fe65](https://github.com/tomgrv/devcontainer-features/commit/c48fe65e7894ddf3cd9e06c5ee7680306950b51a))
34+
35+
#### Features
36+
37+
- ✨ add interactive branch deletion alias ([751a660](https://github.com/tomgrv/devcontainer-features/commit/751a66014166ff621b2f83aed1914e5a8be74e32))
38+
539
## 5.38.7 (2026-03-24)
640

741
_Commits from: v5.38.6..HEAD_

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tomgrv/devcontainer-features",
3-
"version": "5.38.7",
3+
"version": "5.39.0",
44
"description": "Configure dev environment with devcontainer, gitflow, gitversion, git aliases & hooks. Can be used a devcontainer features",
55
"keywords": [
66
"dev",

src/common-utils/_zz_args.sh

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ if test $# -lt 1; then
2121
<argname> <datatype> <varname> <help>
2222
...
2323
help" >&2
24+
25+
echo "With <argname>:
26+
x for flags x with value (e.g., -f value, -h being reserved for help)
27+
- for sequential arguments in the order defined, without flags
28+
+ to capture all remaining arguments as a single variable with spaces as separators
29+
& to capture all remaining arguments as a single variable with newlines as separators" >&2
2430
return 1
2531
fi
2632

@@ -47,6 +53,9 @@ while read argname datatype varname help; do
4753
elif [ "$argname" = "+" ]; then
4854
line="<$datatype...>"
4955
helpinfo="$helpinfo\n\t$(printf '%-12s : %s' "$name" "$help")"
56+
elif [ "$argname" = "&" ]; then
57+
line="<$datatype...>>"
58+
helpinfo="$helpinfo\n\t$(printf '%-12s : %s' "$name" "$help")"
5059
else
5160
if [ "$datatype" = "-" ]; then
5261
line="[-$argname]"
@@ -108,17 +117,25 @@ else
108117
fi
109118
done
110119

111-
# Process remaining '=' parameters
112-
for arg in $(echo $varnames | grep -E "^=" | cut -f2); do
113-
if [ "$#" -gt "0" ]; then
114-
echo "$arg='$1'" && shift 1
115-
fi
120+
# Process remaining '&' parameters
121+
for arg in $(echo $varnames | grep -E "^&" | cut -f2); do
122+
lines=""
123+
while [ "$#" -gt "0" ]; do
124+
# spaces that are not escaped should be preserved as part of the argument
125+
if [ -z "$lines" ]; then
126+
lines="$1"
127+
else
128+
lines="$lines\\\\n$1"
129+
fi
130+
shift 1
131+
done
132+
echo "$arg='$lines'"
116133
done
117134

118135
# Process remaining '+' parameters
119136
for arg in $(echo $varnames | grep -E "^\+" | cut -f2); do
120137
if [ "$#" -gt "0" ]; then
121-
echo "$arg='$(echo $@ | sed "s/ /\t/g")'" && shift $#
138+
echo "$arg='$@'" && shift $#
122139
fi
123140
done
124141

src/common-utils/_zz_dispatch.sh

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ set -e
88

99
# Parse arguments and display help if needed
1010
eval $(
11-
zz_args "Dispatch Utility" $0 "$@" <<- help
11+
./src/common-utils/_zz_args.sh "Dispatch Utility" $0 "$@" <<- help
1212
- caller caller Caller script path
1313
- subcmd subcmd Target script to execute
14-
+ params params Remaining arguments passed to the target script
14+
d debug debug Enable debug mode
15+
& params params Remaining arguments passed to the target script
1516
help
1617
)
1718

@@ -24,6 +25,12 @@ usage() {
2425
fi
2526
}
2627

28+
preserve() {
29+
echo $@ | while read -r line; do
30+
echo \"$line\"
31+
done
32+
}
33+
2734
# Determine caller directory and base name
2835
caller_basename=$(basename "${caller}")
2936
caller_dir=$(dirname "${caller}")
@@ -38,8 +45,6 @@ if [ -z "${subcmd}" ]; then
3845
exit 1
3946
fi
4047

41-
42-
4348
# If caller_dir is just the basename (no slash) and file exists in PATH, try to locate
4449
if [ "${caller_dir}" = "${caller_basename}" ] || [ -z "${caller_dir}" ]; then
4550
caller_dir="."
@@ -52,12 +57,14 @@ else
5257
target="${caller_dir}/${name}"
5358
fi
5459

60+
echo $(preserve $params)
61+
5562
if [ -x "${target}" ]; then
5663
zz_log i "Dispatching to executable target: ${target}" >&2
57-
exec "${target}" $params
64+
exec "${target}" $(preserve $params)
5865
elif [ -f "${target}" ]; then
5966
zz_log i "Dispatching to subshell target: ${target}" >&2
60-
exec sh "${target}" $params
67+
exec sh "${target}" $(preserve $params)
6168
else
6269
# Nothing found: show help and available utilities in the same directory
6370
zz_log w "No dispatch target found" && usage

src/common-utils/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "common-utils",
33
"name": "Common Utils",
44
"description": "Common utils for tomgrv/devcontainer-features",
5-
"version": "5.38.5",
5+
"version": "5.39.0",
66
"dependsOn": {
77
"ghcr.io/devcontainers/features/common-utils": {}
88
},

src/common-utils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tomgrv/common-utils",
3-
"version": "5.38.5",
3+
"version": "5.39.0",
44
"description": "Common utilities and helper scripts for devcontainer features",
55
"files": [
66
"_*.sh",

src/gitutils/_git-release-hotfix.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,9 @@ fi
7575
# then reset develop branch to the main tag
7676
if [ -n "$rebase" ]; then
7777

78-
zz_log i "Rebasing: inverting develop and hotfix branches..."
78+
zz_log i "Rebasing develop commits onto hotfix branch..."
79+
git fix base -p hotfix/$hotfix develop
7980

80-
git fix base -p develop hotfix/"$current"
81-
82-
# Return to hotfix branch
83-
git checkout "hotfix/$current"
84-
85-
zz_log s "Successfully inverted develop and hotfix branches"
8681
fi
8782

83+

src/gitutils/alias.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,10 @@
119119
"cmd": "git fetch --progress --prune --recurse-submodules=no origin && git stash save --keep-index --include-untracked && git merge --ff-only @{u} && git stash pop --index || git stash drop",
120120
"help": "Fetch, stash, fast-forward merge, and restore stash."
121121
},
122+
"tidy": {
123+
"cmd": "git branch --format=\"%(refname:short)\" | grep -v \"main\" | grep -v \"dev\" | awk '{ printf(\"Delete %s? [y/n] \", $1); getline ans<\"/ dev/tty\"; if (ans == \"y\") { system(\"git branch -D \"$1 \">> ~/.gitdeletedbranches\"); } }'",
124+
"help": "Interactively delete local branches except main and dev."
125+
},
122126
"undo": {
123127
"cmd": "git reset --soft HEAD^ --",
124128
"help": "Undo last commit, keep changes staged."

src/gitutils/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"id": "gitutils",
33
"name": "Git Aliases",
44
"description": "A feature to add useful Git aliases to your shell.",
5-
"version": "5.38.7",
5+
"version": "5.39.0",
66
"dependsOn": {
77
"ghcr.io/devcontainers/features/node:1": "lts",
88
"ghcr.io/tomgrv/devcontainer-features/common-utils:5": {

0 commit comments

Comments
 (0)