You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 0 not exclusively due to no version bump so check output
103
+
if [ "${STATUS:-0}" -ne 0 ]; then
104
+
if echo "$SEMVER_OUTPUT_RAW" | grep -q "No release published"; then
105
+
# No new version, but we can find the current version
106
+
echo "No new version required getting current version from git tags"
107
+
DEV_SEMVER_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0-version-not-found") # last git tag so if multiple bumps in other branches making package version there will be some discrepancy but the purpose is distinguishing them for dev purposes.
108
+
echo "DEV_SEMVER_VERSION = $DEV_SEMVER_VERSION"
109
+
exit 0 # treat as success code didnt fail there just was no version increment required
110
+
else
111
+
exit $STATUS # real error → fail pipeline
112
+
fi
113
+
else
114
+
# Get version include prerelease tag
115
+
# Dry run returns different text DEV_SEMVER_VERSION=$(echo "$OUTPUT" | grep -oP 'Published release \K[^\s]+')
116
+
DEV_SEMVER_VERSION=$(echo "$SEMVER_OUTPUT_RAW" | grep -oP 'Dry run: would publish version \K[^\s]+')
117
+
echo "DEV_SEMVER_VERSION = $DEV_SEMVER_VERSION"
118
+
echo "version change required true"
119
+
# Just because weve been handling errors
120
+
exit 0
121
+
fi
122
+
123
+
124
+
# qqqq - name: Run semantic version (None Blocking)
125
+
# run: |
126
+
# # If no version is required we can get an error so here we handle it
# In development, we always package and update the website—even if there’s no version change.
99
-
# This ensures the CI process runs consistently and the latest code is deployed.
100
-
# It's especially useful when squashing commits, as it guarantees the package is still rebuilt and published.
101
-
echo "Packaging and updating the website in development, even without version changes, to ensure consistent CI behavior and updated packages after squashed commits."
134
+
## In development, we always package and update the website—even if there’s no version change.
135
+
## This ensures the CI process runs consistently and the latest code is deployed.
136
+
## It's especially useful when squashing commits, as it guarantees the package is still rebuilt and published.
137
+
#echo "Packaging and updating the website in development, even without version changes, to ensure consistent CI behavior and updated packages after squashed commits."
102
138
103
-
STATUS=$?
104
-
if [ -z "$SEMVER_OUTPUT" ]; then
105
-
SEMVER_OUTPUT=$(echo "$SEMVER_OUTPUT_RAW" | grep -oP 'Found git tag v\K[^\s]+')
106
-
# Note: If Semver falls back to using a Git tag, it will pick the most recent one.
107
-
# This tag may not belong to the current branch, so the result isn't guaranteed to reflect the latest changes on this branch.
108
-
echo "Semver fallback: using latest Git tag, which may not be from the current branch."
109
-
fi
139
+
#STATUS=$?
140
+
#if [ -z "$SEMVER_OUTPUT" ]; then
141
+
#SEMVER_OUTPUT=$(echo "$SEMVER_OUTPUT_RAW" | grep -oP 'Found git tag v\K[^\s]+')
142
+
## Note: If Semver falls back to using a Git tag, it will pick the most recent one.
143
+
## This tag may not belong to the current branch, so the result isn't guaranteed to reflect the latest changes on this branch.
144
+
#echo "Semver fallback: using latest Git tag, which may not be from the current branch."
145
+
#fi
110
146
111
-
if [ -z "$SEMVER_OUTPUT" ]; then
112
-
SEMVER_OUTPUT="0.0.0"
113
-
echo "No semantic version or tag, defaulting to 0.0.0 $SEMVER_OUTPUT"
114
-
fi
147
+
#if [ -z "$SEMVER_OUTPUT" ]; then
148
+
#SEMVER_OUTPUT="0.0.0"
149
+
#echo "No semantic version or tag, defaulting to 0.0.0 $SEMVER_OUTPUT"
0 commit comments