@@ -44,9 +44,9 @@ if [[ "$current_branch" != "main" ]]; then
4444 fi
4545fi
4646
47- # Fetch latest tags
48- echo " Fetching latest tags ..."
49- git fetch --tags
47+ # Fetch latest from origin (main branch and tags)
48+ echo " Fetching latest from origin ..."
49+ git fetch origin main --tags
5050
5151# Get the latest tag
5252latest_tag=$( git describe --tags --abbrev=0 2> /dev/null || echo " v0.0.0" )
@@ -88,10 +88,40 @@ if git rev-parse "$new_version" >/dev/null 2>&1; then
8888 exit 1
8989fi
9090
91+ # Verify the commit has been signed off
92+ echo " "
93+ echo " Verifying commit signoff..."
94+ COMMIT_SHA=$( git rev-parse origin/main)
95+ SIGNOFF_STATUS=$( gh api \
96+ -H " Accept: application/vnd.github+json" \
97+ -H " X-GitHub-Api-Version: 2022-11-28" \
98+ " /repos/sequinstream/sequin/commits/$COMMIT_SHA /statuses" 2> /dev/null || echo " []" )
99+
100+ SIGNOFF_SUCCESS=$( echo " $SIGNOFF_STATUS " | jq ' [.[] | select(.context=="signoff" and .state=="success")] | length' )
101+ SIGNOFF_PENDING=$( echo " $SIGNOFF_STATUS " | jq ' [.[] | select(.context=="signoff" and .state=="pending")] | length' )
102+
103+ if [ " $SIGNOFF_SUCCESS " -gt 0 ]; then
104+ echo -e " ${GREEN} ✓ Commit has been signed off${RESET} "
105+ elif [ " $SIGNOFF_PENDING " -gt 0 ]; then
106+ echo -e " ${YELLOW} ⏳ Signoff is still running. Please wait for it to complete.${RESET} "
107+ echo " Check status at: https://github.com/sequinstream/sequin/commit/$COMMIT_SHA "
108+ exit 1
109+ else
110+ echo -e " ${RED} ✗ Commit has not been signed off.${RESET} "
111+ echo " "
112+ echo " This could mean:"
113+ echo " 1. The signoff workflow hasn't started yet (wait a moment)"
114+ echo " 2. The signoff workflow failed (check GitHub Actions)"
115+ echo " 3. This commit was never pushed to main"
116+ echo " "
117+ echo " Check status at: https://github.com/sequinstream/sequin/commit/$COMMIT_SHA "
118+ exit 1
119+ fi
120+
91121# Show what will happen
92122echo " "
93123echo -e " ${CYAN} This will:${RESET} "
94- echo " 1. Create tag $new_version on commit $( git rev-parse --short HEAD ) "
124+ echo " 1. Create tag $new_version on commit $( git rev-parse --short origin/main ) (origin/main )"
95125echo " 2. Push the tag to GitHub"
96126echo " 3. Trigger the GitHub Actions release workflow"
97127echo " "
111141
112142# Create and push the tag
113143echo " "
114- echo " Creating tag $new_version ..."
115- git tag " $new_version "
144+ echo " Creating tag $new_version on origin/main ..."
145+ git tag " $new_version " origin/main
116146
117147echo " Pushing tag to GitHub..."
118148git push origin " $new_version "
0 commit comments