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
15 changes: 14 additions & 1 deletion .ci/release.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
#!/bin/bash
set -e

if ! [ "$(git rev-list --count origin/master..HEAD)" -eq 0 ]; then
ensure_full_history() {
if git rev-parse --is-shallow-repository 2>/dev/null | grep -q "true"; then
echo "Shallow clone detected. Fetching full history and tags..."
git fetch --unshallow --quiet
fi
if [ -z "$(git tag -l)" ]; then
echo "No tags found. Fetching tags..."
git fetch --tags --quiet
fi
}

ensure_full_history

if ! [ "$(git rev-list --count origin/master..HEAD 2>/dev/null || echo 1)" -eq 0 ]; then
echo "There are commits in this branch. Please merge them first."
echo "CHANGELOG template needs master commit ID."
exit 1
Expand Down
7 changes: 7 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
.ci/release.sh
```

This script **automatically**:
1. Detects and fixes shallow clones (fetches full history + tags)
2. Bumps version in `Cargo.toml`
3. Updates the lock file
4. Runs `make update-changelog`
5. Creates a release commit

## Upgrade dependencies

Requirements:
Expand Down
Loading