Skip to content

Include git commit hash in SQL extension version#8

Merged
bcho merged 2 commits into
mainfrom
copilot/update-sql-extension-version
Jan 3, 2026
Merged

Include git commit hash in SQL extension version#8
bcho merged 2 commits into
mainfrom
copilot/update-sql-extension-version

Conversation

Copilot AI commented Jan 3, 2026

Copy link
Copy Markdown
Contributor

The absurd_version() SQL function now returns the git commit hash alongside the package version for better build traceability.

Changes

  • build.rs: Capture git commit hash at build time via git rev-parse --short HEAD, expose as GIT_COMMIT env var (defaults to "unknown" if git unavailable)
  • lib.rs: Update absurd_version() to return format absurd-sqlite/{version} ({commit})
  • tests: Update assertion to validate new format

Example

SELECT absurd_version();
-- Returns: absurd-sqlite/0.1.0 (cb550ed)

The commit hash updates automatically on each build, allowing deployed extensions to be traced back to their exact source code state.

Original prompt

This section details on the original issue you should resolve

<issue_title>sql extension version should have git commit attached</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI self-assigned this Jan 3, 2026
Co-authored-by: bcho <1975118+bcho@users.noreply.github.com>
Copilot AI changed the title [WIP] Attach git commit to sql extension version Include git commit hash in SQL extension version Jan 3, 2026
Copilot AI requested a review from bcho January 3, 2026 01:28
@bcho bcho marked this pull request as ready for review January 3, 2026 03:12
@bcho bcho merged commit 8f2f6c9 into main Jan 3, 2026
1 check passed
@bcho bcho deleted the copilot/update-sql-extension-version branch January 3, 2026 03:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sql extension version should have git commit attached

2 participants