Skip to content

Commit e66c58d

Browse files
committed
Merge branch 'hotfix/v5.38.X'
2 parents 4c0c1cf + b14e09d commit e66c58d

6 files changed

Lines changed: 39 additions & 20 deletions

File tree

CHANGELOG.md

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

33
# Changelog
44

5+
## 5.38.7 (2026-03-24)
6+
7+
_Commits from: v5.38.6..HEAD_
8+
9+
### 📦 gitutils changes
10+
11+
#### Bug Fixes
12+
13+
- 🐛 add dependency for gitversion feature ([1d5aae7](https://github.com/tomgrv/devcontainer-features/commit/1d5aae7e3e6b8a4dc6b66cda40958c8937565a3b))
14+
- 🐛 update reset logic to use checkout before hard reset ([9261c63](https://github.com/tomgrv/devcontainer-features/commit/9261c638d4f96f408189b258c75ae609a670a409))
15+
516
## 5.38.6 (2026-03-24)
617

718
_Commits from: v5.38.5..HEAD_

package-lock.json

Lines changed: 3 additions & 3 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.6",
3+
"version": "5.38.7",
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: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -136,24 +136,14 @@ if [ $failed -eq 1 ]; then
136136
exit 1
137137
fi
138138

139-
# Reset source branch to source base
140-
zz_log i "Resetting '$source' to source base"
141-
if ! git reset --hard $source; then
142-
zz_log e "Failed to reset '$source' branch"
143-
exit 1
144-
fi
145-
146139
# Fast-forward target branch
147140
zz_log i "Fast-forwarding '$target' branch"
148141
if ! git checkout "$target"; then
149142
zz_log e "Failed to checkout '$target' branch"
150143
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
144+
elif [ -n "$push" ] &&! git push origin "$target"; then
145+
zz_log e "Failed to push '$target' branch to remote"
146+
exit 1
157147
fi
158148

159149
if ! git merge --ff-only "$temp"; then
@@ -167,5 +157,22 @@ else
167157
git branch -D "$temp"
168158
fi
169159

160+
# Reset source branch to source base
161+
zz_log i "Resetting '$source' to source base"
162+
if ! git checkout "$source"; then
163+
zz_log e "Failed to checkout '$source' branch"
164+
exit 1
165+
elif ! git reset --hard "$base"; then
166+
zz_log e "Failed to reset '$source' branch"
167+
exit 1
168+
fi
169+
170+
# Go back to original branch
171+
zz_log i "Switching back to original branch '$current'"
172+
if ! git checkout "$current"; then
173+
zz_log e "Failed to checkout original branch '$current'"
174+
exit 1
175+
fi
176+
170177
# Log success message
171178
zz_log i "Successfully moved commits from '$source' to '$target'"

src/gitutils/devcontainer-feature.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22
"id": "gitutils",
33
"name": "Git Aliases",
44
"description": "A feature to add useful Git aliases to your shell.",
5-
"version": "5.38.6",
5+
"version": "5.38.7",
66
"dependsOn": {
77
"ghcr.io/devcontainers/features/node:1": "lts",
88
"ghcr.io/tomgrv/devcontainer-features/common-utils:5": {
99
"utils": "jq dos2unix git-flow"
10-
}
10+
},
11+
"ghcr.io/tomgrv/devcontainer-features/gitversion:5": {}
1112
},
1213
"installsAfter": [
1314
"ghcr.io/tomgrv/devcontainer-features/common-utils",

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.6",
3+
"version": "5.38.7",
44
"description": "Git utilities and aliases for development workflow",
55
"files": [
66
"_*.sh",

0 commit comments

Comments
 (0)