@eggplanty/mycli 0.1.8 → 0.1.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/package.json +1 -1
- package/scripts/tag-release.sh +9 -0
package/package.json
CHANGED
package/scripts/tag-release.sh
CHANGED
|
@@ -35,6 +35,15 @@ if git diff --name-only | grep -q 'package.json' || git diff --cached --name-onl
|
|
|
35
35
|
exit 1
|
|
36
36
|
fi
|
|
37
37
|
|
|
38
|
+
# Ensure current branch is pushed to remote before tagging
|
|
39
|
+
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
|
|
40
|
+
LOCAL_SHA=$(git rev-parse HEAD)
|
|
41
|
+
REMOTE_SHA=$(git rev-parse "origin/${CURRENT_BRANCH}" 2>/dev/null || echo "")
|
|
42
|
+
if [ "$LOCAL_SHA" != "$REMOTE_SHA" ]; then
|
|
43
|
+
echo "Error: local branch '${CURRENT_BRANCH}' is not in sync with remote. Please push your commits first." >&2
|
|
44
|
+
exit 1
|
|
45
|
+
fi
|
|
46
|
+
|
|
38
47
|
# Create and push tag
|
|
39
48
|
git tag "$TAG"
|
|
40
49
|
git push origin "$TAG"
|