Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ The version is **derived from git tags** — it exists nowhere in the repository
## Releasing a version

```bash
./tagRelease.sh 0.1.0
./tagRelease.sh ai-docs 0.1.0
```

The first argument is the project name, guarding against running this in the wrong repo.
The script only tags: it verifies a clean tree on an up-to-date `main`, then tags and
pushes `v0.1.0` — no publishing happens locally. The tag push triggers
`.github/workflows/release.yml`, which builds, tests, and runs the publish scripts:
Expand Down
11 changes: 9 additions & 2 deletions tagRelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,16 @@
# The tag push triggers .github/workflows/release.yml, which builds and publishes.
set -e

VERSION=$1
# First arg is the project name, guarding against running this in the wrong repo.
PROJECT="ai-docs"
if [ "$1" != "$PROJECT" ]; then
echo "usage: ./tagRelease.sh $PROJECT X.Y.Z"
exit 1
fi

VERSION=$2
if [[ ! "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "usage: ./tagRelease.sh X.Y.Z"
echo "usage: ./tagRelease.sh $PROJECT X.Y.Z"
exit 1
fi

Expand Down
Loading