Skip to content

Commit 4c0c1cf

Browse files
committed
Merge branch 'hotfix/v5.38.X'
2 parents 94c7b0b + 99852b7 commit 4c0c1cf

9 files changed

Lines changed: 87 additions & 95 deletions

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
# Changelog
44

5+
## 5.38.6 (2026-03-24)
6+
7+
_Commits from: v5.38.5..HEAD_
8+
9+
### 📦 gitutils changes
10+
11+
#### Bug Fixes
12+
13+
- 🐛 correct hotfix branch creation variable ([171cda6](https://github.com/tomgrv/devcontainer-features/commit/171cda67a8d984ec6eaffd65cf7a205defa6e615))
14+
- 🐛 update commit retrieval logic to exclude merge commits ([3dce7e0](https://github.com/tomgrv/devcontainer-features/commit/3dce7e00c9984cc9f8861fe4a3735c8b00cdce29))
15+
16+
### 📦 gitversion changes
17+
18+
#### Bug Fixes
19+
20+
- 🐛 update dependencies to include docker-in-docker ([d2cfa7d](https://github.com/tomgrv/devcontainer-features/commit/d2cfa7d98a5604e9d0a5b6053cc252181f8a1c20))
21+
522
## 5.38.5 (2026-03-23)
623

724
_Commits from: v5.38.4..HEAD_
@@ -567,4 +584,4 @@ _Commits from: v5.25.0..HEAD_
567584

568585
---
569586

570-
_Generated on 2026-03-23 by [tomgrv/devcontainer-features](https://github.com/tomgrv/devcontainer-features)_
587+
_Generated on 2026-03-24 by [tomgrv/devcontainer-features](https://github.com/tomgrv/devcontainer-features)_

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.5",
3+
"version": "5.38.6",
44
"description": "Configure dev environment with devcontainer, gitflow, gitversion, git aliases & hooks. Can be used a devcontainer features",
55
"keywords": [
66
"dev",

src/gitutils/_git-fix-base.sh

Lines changed: 17 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,8 @@
33
# Function to print help and manage arguments
44
eval $(
55
zz_args "Fix git base - rebase commits from one branch to another" $0 "$@" <<-help
6-
p - push force push changes to remote
6+
p - push push changes to remote
77
n - dry-run show what would be done without making changes
8-
- source source source branch to take commits from (default: current branch)
98
- target target target branch to rebase commits onto
109
- source source source branch to take commits from (default: current branch)
1110
help
@@ -53,8 +52,8 @@ else
5352
zz_log i "Found merge base: $base"
5453
fi
5554

56-
# Get commits that are in source but not in target
57-
commits=$(git log --reverse --pretty=oneline ${base}..${source} | grep -vE "^[a-f0-9]+ Merge" | awk '{print $1}')
55+
# Get commits that are not pushed on the source branch
56+
commits=$(git log --reverse --format=%H "$source" --not origin/"$source" --not "$target" --no-merges)
5857

5958
if [ -z "$commits" ]; then
6059
zz_log i "No commits to move from '$source' to '$target'"
@@ -137,16 +136,9 @@ if [ $failed -eq 1 ]; then
137136
exit 1
138137
fi
139138

140-
# Reset source branch to merge base
141-
zz_log i "Resetting '$source' to merge base"
142-
if ! git checkout "$source"; then
143-
zz_log e "Failed to checkout '$source' branch"
144-
# Cleanup temp branch
145-
git branch -D "$temp" 2>/dev/null
146-
exit 1
147-
fi
148-
149-
if ! git reset --hard "$base"; then
139+
# Reset source branch to source base
140+
zz_log i "Resetting '$source' to source base"
141+
if ! git reset --hard $source; then
150142
zz_log e "Failed to reset '$source' branch"
151143
exit 1
152144
fi
@@ -156,42 +148,24 @@ zz_log i "Fast-forwarding '$target' branch"
156148
if ! git checkout "$target"; then
157149
zz_log e "Failed to checkout '$target' branch"
158150
exit 1
151+
elif [ -n "$push" ]; then
152+
zz_log i "Pushing changes to remote"
153+
if ! git push origin "$target"; then
154+
zz_log e "Failed to push '$target' branch to remote"
155+
exit 1
156+
fi
159157
fi
160158

161159
if ! git merge --ff-only "$temp"; then
162160
zz_log e "Failed to fast-forward '$target' branch"
163161
# Cleanup temp branch
164162
git branch -D "$temp" 2>/dev/null
165163
exit 1
166-
fi
167-
168-
# Cleanup temporary branch
169-
zz_log i "Cleaning up temporary branch"
170-
git branch -D "$temp"
171-
172-
# Return to original branch if it still exists and is different from source
173-
if [ "$current" != "$source" ] && git rev-parse --verify "$current" >/dev/null 2>&1; then
174-
git checkout "$current"
175164
else
176-
# If original branch was source, stay on target
177-
zz_log i "Staying on '$target' branch"
178-
fi
179-
180-
# Push changes if push flag is set
181-
if [ -n "$push" ]; then
182-
zz_log i "Pushing changes to remote..."
183-
184-
# Push source branch (reset)
185-
if git rev-parse --verify "origin/$source" >/dev/null 2>&1; then
186-
zz_log i "Force pushing '$source' branch"
187-
git push --force-with-lease origin "$source"
188-
fi
189-
190-
# Push target branch (with new commits)
191-
if git rev-parse --verify "origin/$target" >/dev/null 2>&1; then
192-
zz_log i "Pushing '$target' branch"
193-
git push origin "$target"
194-
fi
165+
# Cleanup temporary branch
166+
zz_log i "Cleaning up temporary branch"
167+
git branch -D "$temp"
195168
fi
196169

197-
zz_log i "Successfully moved commits from '$source' to '$target'"
170+
# Log success message
171+
zz_log i "Successfully moved commits from '$source' to '$target'"

src/gitutils/_git-release-hotfix.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fi
2525
# or if rebase is forced via command line option
2626
if [ -n "$rebase" ]; then
2727
zz_log i "Rebase forced via command line option, will rebase commits onto hotfix branch"
28-
elif git log "$main"..HEAD --pretty=%B | grep -E '^[a-zA-Z]' | grep -vE "$main|^fix(\(.+\))?:" >/dev/null; then
28+
elif git log --reverse --pretty=oneline --format=%B develop --not origin/develop --no-merges | grep -vE "^$|^fix(\(.+\))?:" >/dev/null; then
2929
zz_log w "There are commits since $main that are not of type 'fix:', creating hotfix branch only"
3030
unset rebase
3131
elif [ -z "$stash" ]; then
@@ -62,7 +62,7 @@ GIT_EDITOR=:
6262
hotfix=$(echo "$main" | sed -E 's/([0-9]+)\.([0-9]+)\.([0-9]+)/\1.\2.X/')
6363

6464
# Create hotfix branch
65-
git flow hotfix start $current
65+
git flow hotfix start $hotfix
6666

6767
# If stash was used, pop it back
6868
if [ -n "$stash" ]; then

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.5",
5+
"version": "5.38.6",
66
"dependsOn": {
77
"ghcr.io/devcontainers/features/node:1": "lts",
88
"ghcr.io/tomgrv/devcontainer-features/common-utils:5": {

src/gitutils/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tomgrv/gitutils",
3-
"version": "5.38.5",
3+
"version": "5.38.6",
44
"description": "Git utilities and aliases for development workflow",
55
"files": [
66
"_*.sh",
Lines changed: 21 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,24 @@
11
{
2-
"id": "gitversion",
3-
"name": "GitVersion feature",
4-
"description": "Add gitversion to your devcontainer",
5-
"version": "5.37.0",
6-
"dependsOn": {
7-
"ghcr.io/tomgrv/devcontainer-features/common-utils:5": ""
8-
},
9-
"installsAfter": [
10-
"ghcr.io/tomgrv/devcontainer-features/common-utils",
11-
"ghcr.io/devcontainers/features/dotnet"
12-
],
13-
"options": {
14-
"version": {
15-
"type": "string",
16-
"default": "6.5.1",
17-
"description": "The version of GitVersion to use"
2+
"id": "gitversion",
3+
"name": "GitVersion feature",
4+
"description": "Add gitversion to your devcontainer",
5+
"version": "5.38.6",
6+
"dependsOn": {
7+
"ghcr.io/devcontainers/features/docker-in-docker:2": "",
8+
"ghcr.io/tomgrv/devcontainer-features/common-utils:5": ""
9+
},
10+
"installsAfter": [
11+
"ghcr.io/tomgrv/devcontainer-features/common-utils",
12+
"ghcr.io/devcontainers/features/dotnet"
13+
],
14+
"options": {
15+
"version": {
16+
"type": "string",
17+
"default": "6.5.1",
18+
"description": "The version of GitVersion to use"
19+
}
20+
},
21+
"postCreateCommand": {
22+
"config": "configure-feature gitversion"
1823
}
19-
},
20-
"postCreateCommand": {
21-
"config": "configure-feature gitversion"
22-
}
2324
}

src/gitversion/package.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
{
2-
"name": "@tomgrv/gitversion",
3-
"version": "5.37.0",
4-
"description": "GitVersion integration and version management scripts",
5-
"files": [
6-
"_*.sh",
7-
"install.sh",
8-
"install-tools.sh",
9-
"_scripts.package.json",
10-
"stubs/**/*"
11-
],
12-
"bin": {
13-
"bump-changelog": "./_bump-changelog.sh",
14-
"bump-tag": "./_bump-tag.sh",
15-
"bump-version": "./_bump-version.sh",
16-
"checkout-version": "./_checkout-version.sh",
17-
"gv": "./_gv.sh"
18-
},
19-
"scripts": {},
20-
"dependencies": {},
21-
"peerDependencies": {
22-
"@tomgrv/common-utils": "^5.0.0"
23-
}
2+
"name": "@tomgrv/gitversion",
3+
"version": "5.38.6",
4+
"description": "GitVersion integration and version management scripts",
5+
"files": [
6+
"_*.sh",
7+
"install.sh",
8+
"install-tools.sh",
9+
"_scripts.package.json",
10+
"stubs/**/*"
11+
],
12+
"bin": {
13+
"bump-changelog": "./_bump-changelog.sh",
14+
"bump-tag": "./_bump-tag.sh",
15+
"bump-version": "./_bump-version.sh",
16+
"checkout-version": "./_checkout-version.sh",
17+
"gv": "./_gv.sh"
18+
},
19+
"scripts": {},
20+
"dependencies": {},
21+
"peerDependencies": {
22+
"@tomgrv/common-utils": "^5.0.0"
23+
}
2424
}

0 commit comments

Comments
 (0)