@@ -81,17 +81,10 @@ jobs:
8181
8282 # Determine if the package has changed (or include all on manual trigger)
8383 if [ "$EVENT_NAME" == "workflow_dispatch" ] || ! git diff --quiet $COMMIT_SHA~1 $COMMIT_SHA -- "$pkg/"; then
84- HAS_VERSION =$(jq 'has(" version")' "$PKG_JSON" )
85- if [ "$HAS_VERSION" == "false" ]; then
86- # Include packages without version field
84+ OLD_VERSION =$(git show $COMMIT_SHA~1:$PKG_JSON | jq -r '. version' )
85+ NEW_VERSION=$(jq -r '.version' "$PKG_JSON")
86+ if [ "$OLD_VERSION" != "$NEW_VERSION" ]; then
8787 CHANGED_PACKAGES+=("$PKG_NAME")
88- else
89- # For packages with version field, include only if version changed
90- OLD_VERSION=$(git show $COMMIT_SHA~1:$PKG_JSON | jq -r '.version')
91- NEW_VERSION=$(jq -r '.version' "$PKG_JSON")
92- if [ "$OLD_VERSION" != "$NEW_VERSION" ]; then
93- CHANGED_PACKAGES+=("$PKG_NAME")
94- fi
9588 fi
9689 fi
9790 done
@@ -138,12 +131,6 @@ jobs:
138131 # Install deps
139132 pnpm install --frozen-lockfile
140133
141- HAS_VERSION=$(jq 'has("version")' package.json)
142- if [ "$HAS_VERSION" == "false" ]; then
143- # Only bump version if package has no version field
144- npm version --no-git-tag-version 1.0.1-$COMMIT_SHA
145- fi
146-
147134 # Check if a custom publish script exists in package.json
148135 if jq -e '.scripts.publish' package.json > /dev/null; then
149136 pnpm run publish
0 commit comments