@seanyao/roll 2026.510.3 → 2026.510.4

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/bin/roll CHANGED
@@ -4,7 +4,7 @@ set -euo pipefail
4
4
  # Roll — AI Agent Convention Manager
5
5
  # Single source of truth for how all AI coding agents behave.
6
6
 
7
- VERSION="2026.510.3"
7
+ VERSION="2026.510.4"
8
8
  ROLL_HOME="${ROLL_HOME:-${HOME}/.roll}"
9
9
  ROLL_CONFIG="${ROLL_HOME}/config.yaml"
10
10
  ROLL_GLOBAL="${ROLL_HOME}/conventions/global"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seanyao/roll",
3
- "version": "2026.510.3",
3
+ "version": "2026.510.4",
4
4
  "description": "Roll — Roll out features with AI agents",
5
5
  "scripts": {
6
6
  "test": "find tests/unit tests/integration -name '*.bats' | sort | xargs ./tests/helpers/bats-core/bin/bats"
@@ -38,14 +38,29 @@ Then calculate:
38
38
  ```bash
39
39
  today=$(date +%Y.%-m%d)
40
40
  last_n=$(git tag | grep "^v${today}\." | sed "s/^v${today}\.//" | sort -n | tail -1)
41
- n=$(( ${last_n:-0} + 1 ))
42
- version="${today}.${n}"
41
+
42
+ # Reuse tag if latest today's tag already points to HEAD (e.g. npm publish failed, retrying)
43
+ if [[ -n "$last_n" ]]; then
44
+ last_tag="v${today}.${last_n}"
45
+ if [[ "$(git rev-list -n1 "$last_tag")" == "$(git rev-parse HEAD)" ]]; then
46
+ version="${today}.${last_n}"
47
+ echo "♻️ Reusing ${last_tag} — same commit, skipping version bump"
48
+ # Skip Steps 2-4, jump directly to Step 5 (GitHub Release) or Step 6 (npm publish)
49
+ else
50
+ n=$(( last_n + 1 ))
51
+ version="${today}.${n}"
52
+ fi
53
+ else
54
+ version="${today}.1"
55
+ fi
43
56
  ```
44
57
 
45
58
  Show the proposed version to the user:
46
59
  ```
47
60
  Recent tags: v2026.419.1 v2026.419.2 v2026.420.3
48
- Proposed version: 2026.420.4
61
+ Proposed version: 2026.420.4 ← new version (code changed since last tag)
62
+ — or —
63
+ ♻️ Reusing v2026.420.3 ← same commit, retry after npm failure
49
64
  Proceed? [y/N]
50
65
  ```
51
66
 
@@ -81,11 +96,22 @@ git push && git push --tags
81
96
 
82
97
  ### Step 5: Create GitHub Release
83
98
 
84
- Extract the current version's changelog entries and create a GitHub Release:
99
+ **This step is mandatory.** Without it, `roll` update notifications will not work.
100
+
101
+ Convert version to changelog date, extract notes, then create the release:
85
102
 
86
103
  ```bash
87
- # Extract release notes from CHANGELOG.md (current version's section)
88
- notes=$(sed -n "/^## ${version}$/,/^## /{ /^## ${version}$/d; /^## /d; p; }" CHANGELOG.md)
104
+ # Convert version (2026.510.3) to changelog date (2026.05.10)
105
+ _year=$(echo "${version}" | cut -d. -f1)
106
+ _mmdd=$(echo "${version}" | cut -d. -f2)
107
+ if [ ${#_mmdd} -eq 3 ]; then
108
+ _cl_date="${_year}.0${_mmdd:0:1}.${_mmdd:1:2}"
109
+ else
110
+ _cl_date="${_year}.${_mmdd:0:2}.${_mmdd:2:2}"
111
+ fi
112
+
113
+ # Extract release notes from CHANGELOG.md
114
+ notes=$(sed -n "/^## ${_cl_date}$/,/^## /{ /^## ${_cl_date}$/d; /^## /d; p; }" CHANGELOG.md | sed '/^[[:space:]]*$/d')
89
115
 
90
116
  gh release create "v${version}" \
91
117
  --title "v${version}" \