@neferbyte/cherry-release-cli 1.0.7 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/cherry-release +14 -4
- package/package.json +5 -2
package/bin/cherry-release
CHANGED
|
@@ -140,13 +140,23 @@ COMMITS_production=""
|
|
|
140
140
|
for branch in staging production; do
|
|
141
141
|
hashes=$(git cherry "origin/$branch" origin/development | grep '^+' | awk '{print $2}')
|
|
142
142
|
|
|
143
|
-
# Filter out version bump commits
|
|
143
|
+
# Filter out version bump commits and already-promoted commits
|
|
144
144
|
filtered=""
|
|
145
145
|
for hash in $hashes; do
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
subject=$(git log -1 --format="%s" "$hash")
|
|
147
|
+
|
|
148
|
+
# Skip version bump commits (commit-and-tag-version)
|
|
149
|
+
if [[ "$subject" =~ ^chore\(release\): ]]; then
|
|
150
|
+
continue
|
|
151
|
+
fi
|
|
152
|
+
|
|
153
|
+
# Skip commits whose subject already exists on the target branch
|
|
154
|
+
# (handles cases where git cherry misidentifies due to package.json/lockfile diffs)
|
|
155
|
+
if git log "origin/$branch" --format="%s" | grep -qFx "$subject"; then
|
|
156
|
+
continue
|
|
149
157
|
fi
|
|
158
|
+
|
|
159
|
+
filtered="$filtered $hash"
|
|
150
160
|
done
|
|
151
161
|
|
|
152
162
|
eval "COMMITS_${branch}=\"${filtered# }\""
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neferbyte/cherry-release-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"description": "Cherry-pick commits across environment branches and tag releases",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"bin": {
|
|
@@ -9,5 +9,8 @@
|
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"bin/"
|
|
12
|
-
]
|
|
12
|
+
],
|
|
13
|
+
"peerDependencies": {
|
|
14
|
+
"commit-and-tag-version": ">=12.0.0"
|
|
15
|
+
}
|
|
13
16
|
}
|