feat: release enablement, archival support, CI/CD refinements, and branding#8
Merged
Conversation
Contributor
CI Development Pipeline Status❌ Pipeline: Failed or was cancelled. Check logs |
Contributor
CI Development Pipeline Status✅ Pipeline: Completed successfully. View Run Details |
There was a problem hiding this comment.
Pull request overview
This PR prepares GitVersioned for an initial release by adding archive-based version resolution (for ZIP/source bundles without a .git directory), refactoring Git metadata into a unified GitReference model, and updating CI/CD plus documentation/branding.
Changes:
- Added archive fallback support via
.git_archival.txt/.gitattributesand extended version-resolution logic to use it when git metadata is unavailable. - Refactored git metadata models into
GitReference, updated templates to emit richer git metadata, and expanded unit/e2e coverage. - Refined GitHub Actions workflows for nightly/release pipelines and refreshed docs/MkDocs branding assets.
Reviewed changes
Copilot reviewed 26 out of 42 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit/utils/test_git.py | Updates unit tests for GitReference and new git log parsing/commit counting behavior. |
| tests/unit/test_versioning.py | Refactors/expands version-resolution tests, including archive fallback cases. |
| tests/e2e/test_builds.py | Adds an e2e build test that simulates an archive build (no .git). |
| src/gitversioned/versioning.py | Implements multi-source iteration, archive fallback parsing, dirty-ignore handling, and updated function-source behavior. |
| src/gitversioned/utils/git.py | Introduces GitReference and updates repository iterators/parsing (commits/tags/branches) and commit counting. |
| src/gitversioned/utils/init.py | Re-exports GitReference and removes old git metadata exports. |
| src/gitversioned/templates/release.py.template | Switches templates to use ref and emits additional git metadata fields. |
| src/gitversioned/templates/dev.py.template | Switches templates to use ref and emits additional git metadata fields. |
| src/gitversioned/settings.py | Adds regex_version, archive regex/config, and dirty_ignore setting. |
| scratch2.py | Removes scratch helper script. |
| scratch.py | Removes scratch helper script. |
| README.md | Updates positioning and adds archive-support quickstart instructions. |
| mkdocs.yml | Configures MkDocs logo/favicon branding. |
| docs/index.md | Updates docs landing page with branding assets and diagrams. |
| docs/guides/setuptools.md | Adds note about ZIP downloads and archive fallback. |
| docs/guides/hatchling.md | Adds note about ZIP downloads and archive fallback. |
| docs/guides/configuration.md | Documents archive fallback and dirty_ignore. |
| docs/guides/concepts.md | Documents archive fallback behavior in conceptual flow. |
| docs/getting-started/quickstart.md | Adds “Configure Archive Support” steps. |
| docs/assets/branding/logo-light.svg | Replaces placeholder with new light logo asset. |
| docs/assets/branding/logo-dark.svg | Replaces placeholder with new dark logo asset. |
| docs/assets/branding/logo-blue.svg | Adds blue logo variant asset. |
| docs/assets/branding/icon-white.svg | Adds white icon asset. |
| docs/assets/branding/icon-blue.svg | Adds blue icon asset. |
| docs/assets/branding/icon-black.svg | Adds black icon asset. |
| .pre-commit-config.yaml | Removes check-added-large-files hook. |
| .github/workflows/release.yml | Refines release docs aliasing and publishing workflow usage. |
| .github/workflows/nightly.yml | Adds change-detection gating and OIDC permissions for nightly pipeline stages. |
| .github/workflows/_security.yml | Removes TruffleHog base/head args to avoid identical ref issues. |
| .github/workflows/_publish.yml | Switches to OIDC publishing, adds attestations, and creates GitHub Releases on tags. |
| .gitattributes | Enables export-subst for .git_archival.txt. |
| .git_archival.txt | Adds archive metadata template for version/metadata fallback. |
Comments suppressed due to low confidence (1)
tests/unit/utils/test_git.py:296
test_commitspatches_ensure_valid_repositoryand_stream_command, butGitRepository.commitsnow callsself.commit_count, which triggers git subprocess calls viais_available/_execute_command. This makes the unit test environment-dependent. PatchGitRepository.commit_count(oris_available/_execute_command) in this test to keep it hermetic.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
CI Development Pipeline Status✅ Pipeline: Completed successfully. View Run Details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a substantial set of features, fixes, and documentation updates to prepare GitVersioned for its initial release. The key changes include:
.git_archival.txt. This enables GitVersioned to resolve version information for source code bundles (like GitHub ZIP downloads) when the.gitdirectory is absent.dirty_ignoreSetting: Enhanced the configuration model to allow users to specify file patterns that should be ignored during the repository dirty-state check.GitReferenceand configuring default values (such asdistance_from_headdefault maximums) for edge cases where commit histories are shallow or missing.README.mdand MkDocs site to feature the new branding, document the archive fallback functionality, and polish the general project presentation.dirty_ignorevalidations.Type of Change
README.md,SUPPORT.md, docstrings, etc.)Test Plan
_security.ymlworkflow completes successfully without TruffleHog reference errors.tests/unit/test_versioning.py) explicitly validating the_resolve_archivefallback pathway.dirty_ignorebehaviors locally by verifying that listed untracked or modified files do not trigger the dirty state flag.hatch run test:all.hatch run docs:buildto confirm new assets and configurations load correctly.Related Issues
Screenshots / Visuals (if applicable)
(Review the updated MkDocs documentation locally to see the newly integrated
logo-light/logo-darkanduser-flow-light/user-flow-darkdiagrams.)Use of AI
## WRITTEN BY AI ##)Checklist
gitversioned.