@eggplanty/mycli 0.1.7 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eggplanty/mycli",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "A simple CLI demo built with Go",
5
5
  "bin": {
6
6
  "mycli": "scripts/run.js"
@@ -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"