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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets).

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md).
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "tigrisdata/cli" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/fix-enable-snapshots-create.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tigrisdata/cli": patch
---

Fix `buckets create --enable-snapshots` not enabling snapshots. The flag is delivered camelCased (`enableSnapshots`) and was not being read by the create command, so buckets were created with snapshots left off.
5 changes: 5 additions & 0 deletions .changeset/fork-rebase-merge-commands.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@tigrisdata/cli": minor
---

Add `buckets rebase` and `buckets merge` commands for working with bucket forks. `rebase` advances a fork onto the latest state of its source bucket; `merge` merges a fork's changes back into its source, auto-resolving the parent (with `--into` to override and `--from-snapshot` to scope the merge).
90 changes: 72 additions & 18 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: Release
on:
push:
branches:
- release
- main
# Manual dispatch publishes a beta prerelease (see the `beta` job below).
workflow_dispatch:

permissions:
Expand All @@ -13,46 +14,70 @@ permissions:
id-token: write

jobs:
# Stable releases via Changesets. On push to main:
# - if changesets are present, opens/updates the "Version Packages" PR
# - once that PR is merged (version bumped, no changesets left), publishes
# to npm, creates the v<version> git tag and GitHub release.
release:
if: github.event_name == 'push'
runs-on: ubuntu-latest
outputs:
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
new_release_version: ${{ steps.semantic.outputs.new_release_version }}
new_release_published: ${{ steps.changesets.outputs.published }}
new_release_version: ${{ steps.version.outputs.value }}

steps:
# Checkout code with full history to get tags
- uses: actions/checkout@v5
with:
fetch-depth: 0

# Set up Node.js
- uses: actions/setup-node@v5
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'

# Install dependencies, test, and build
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm run test
- run: npm run test:integration
- run: npm run publint

# A push to main with no pending changesets means the Version Packages
# PR was merged and changesets is about to publish — gate that publish on
# the integration suite. Feature-merge pushes still have changesets
# pending, so they skip this heavier step (it also runs in ci.yaml).
- name: Detect pending changesets
id: pending
run: |
if ls .changeset/*.md 2>/dev/null | grep -qvx '.changeset/README.md'; then
echo 'changesets=true' >> "$GITHUB_OUTPUT"
else
echo 'changesets=false' >> "$GITHUB_OUTPUT"
fi

- name: Integration tests (pre-publish gate)
if: steps.pending.outputs.changesets == 'false'
run: npm run test:integration
env:
TIGRIS_STORAGE_ACCESS_KEY_ID: ${{ secrets.TIGRIS_STORAGE_ACCESS_KEY_ID }}
TIGRIS_STORAGE_SECRET_ACCESS_KEY: ${{ secrets.TIGRIS_STORAGE_SECRET_ACCESS_KEY }}
Comment thread
cursor[bot] marked this conversation as resolved.
- run: npm run publint
- run: npm audit signatures

# Release to GitHub and NPM
- name: Release
id: semantic
- name: Create Release PR or publish to npm
id: changesets
uses: changesets/action@v1
with:
version: npm run version-packages
publish: npm run release
commit: 'chore: version packages'
title: 'chore: version packages'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true

- name: Resolve published version
id: version
if: steps.changesets.outputs.published == 'true'
run: |
npm run semantic-release
git fetch --tags
TAG=$(git tag --points-at HEAD | grep "^v" | head -1 || true)
echo "new_release_version=${TAG#v}" >> $GITHUB_OUTPUT
echo "new_release_published=$( [ -n "$TAG" ] && echo true || echo false )" >> $GITHUB_OUTPUT
echo "value=$(echo '${{ steps.changesets.outputs.publishedPackages }}' | jq -r '.[0].version')" >> "$GITHUB_OUTPUT"

build-binaries:
needs: release
Expand Down Expand Up @@ -150,7 +175,7 @@ jobs:

update-homebrew:
needs: [release, build-binaries]
if: needs.release.outputs.new_release_published == 'true' && github.ref == 'refs/heads/release'
if: needs.release.outputs.new_release_published == 'true' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest

steps:
Expand All @@ -162,3 +187,32 @@ jobs:
env:
HOMEBREW_TAP_TOKEN: ${{ secrets.HOMEBREW_TAP_TOKEN }}
run: scripts/update-homebrew.sh ${{ needs.release.outputs.new_release_version }}

# On-demand beta prereleases (manual workflow_dispatch only).
# Publishes an ephemeral snapshot of any pending changesets to the npm
# `beta` dist-tag (version like 3.4.0-beta-<timestamp>). No git tag or
# GitHub release is created. Requires at least one pending changeset.
beta:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0

- uses: actions/setup-node@v5
with:
node-version: '22'
registry-url: 'https://registry.npmjs.org'

- run: npm ci
- run: npm run build

- name: Publish beta snapshot to npm
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_PROVENANCE: true
run: |
npx changeset version --snapshot beta
npx changeset publish --tag beta --no-git-tag
44 changes: 0 additions & 44 deletions .github/workflows/sync-release-to-main.yaml

This file was deleted.

1 change: 0 additions & 1 deletion .husky/commit-msg

This file was deleted.

Loading