Skip to content

Commit 82363af

Browse files
tbitcsoz-agent
andcommitted
fix: remove dev badge; fix RTD latest version identifier to develop
README.md: - Remove the dev PyPI badge (include_prereleases=true never reliably worked) - Keep only the stable badge which correctly shows v0.2.3 dev-release.yml: - Add Step 2: PATCH /versions/latest/ with identifier='develop' This is the actual root cause — the version object has its own branch setting separate from the project-level default_branch - Numbered steps [1/3], [2/3], [3/3] for clarity in logs Co-Authored-By: Oz <oz-agent@warp.dev>
1 parent 9f39ec1 commit 82363af

2 files changed

Lines changed: 18 additions & 8 deletions

File tree

.github/workflows/dev-release.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,29 @@ jobs:
106106
echo " Fix: https://readthedocs.org/projects/specsmith/versions/ → activate 'develop'"
107107
fi
108108
109-
# Set RTD default branch to 'develop' so /en/latest/ always tracks dev builds.
110-
# This is idempotent — safe to run on every push to develop.
111-
echo "Setting RTD default branch to 'develop'..."
109+
# Step 1: Set RTD project default_branch to 'develop'
110+
echo "[1/3] Setting RTD project default_branch to 'develop'..."
112111
PATCH_STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X PATCH \
113112
-H "Authorization: Token $RTD_TOKEN" \
114113
-H "Content-Type: application/json" \
115114
-d '{"default_branch": "develop"}' \
116115
"https://readthedocs.org/api/v3/projects/specsmith/")
117-
echo "RTD default_branch PATCH: HTTP $PATCH_STATUS"
116+
echo "RTD project PATCH: HTTP $PATCH_STATUS"
118117
119-
# Trigger /en/latest/ build (tracks default branch = develop after above PATCH)
120-
echo "Triggering RTD build for 'latest' version..."
118+
# Step 2: Set the 'latest' VERSION object's identifier to 'develop'
119+
# This is the key step — the version object has its own branch setting
120+
# separate from the project-level default_branch.
121+
echo "[2/3] Setting RTD 'latest' version identifier to 'develop'..."
122+
VER_PATCH=$(curl -s -o /tmp/ver_patch.txt -w "%{http_code}" -X PATCH \
123+
-H "Authorization: Token $RTD_TOKEN" \
124+
-H "Content-Type: application/json" \
125+
-d '{"identifier": "develop", "active": true}' \
126+
"https://readthedocs.org/api/v3/projects/specsmith/versions/latest/")
127+
echo "RTD 'latest' version PATCH: HTTP $VER_PATCH"
128+
cat /tmp/ver_patch.txt | head -c 200 || true
129+
130+
# Step 3: Trigger a fresh /en/latest/ build (now tracks develop)
131+
echo "[3/3] Triggering RTD 'latest' build from develop..."
121132
LATEST_STATUS=$(curl -s -o /dev/null -w "%{http_code}" -X POST \
122133
-H "Authorization: Token $RTD_TOKEN" \
123134
"https://readthedocs.org/api/v3/projects/specsmith/versions/latest/builds/")

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
[![CI](https://github.com/BitConcepts/specsmith/actions/workflows/ci.yml/badge.svg)](https://github.com/BitConcepts/specsmith/actions/workflows/ci.yml)
44
[![Docs](https://readthedocs.org/projects/specsmith/badge/?version=stable)](https://specsmith.readthedocs.io/en/stable/)
5-
[![PyPI Stable](https://img.shields.io/pypi/v/specsmith?label=stable&style=flat&color=blue&cacheSeconds=60)](https://pypi.org/project/specsmith/)
6-
[![PyPI Dev](https://img.shields.io/pypi/v/specsmith?include_prereleases=true&label=dev&style=flat&color=orange&cacheSeconds=60)](https://pypi.org/project/specsmith/#history)
5+
[![PyPI](https://img.shields.io/pypi/v/specsmith?label=stable&style=flat&color=blue&cacheSeconds=60)](https://pypi.org/project/specsmith/)
76
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
87
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)
98

0 commit comments

Comments
 (0)