Skip to content

Commit dd3008d

Browse files
authored
Populate the version details for local builds (#683)
<!-- Provide a brief summary of your changes --> ## Motivation and Context <!-- Why is this change needed? What problem does it solve? --> Motivated by - #681 (comment) ## How Has This Been Tested? <!-- Have you tested this in a real application? Which scenarios were tested? --> ## Breaking Changes <!-- Will users need to update their code or configurations? --> ## Types of changes <!-- What types of changes does your code introduce? Put an `x` in all the boxes that apply: --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update ## Checklist <!-- Go over all the following points, and put an `x` in all the boxes that apply. --> - [ ] I have read the [MCP Documentation](https://modelcontextprotocol.io) - [ ] My code follows the repository's style guidelines - [ ] New and existing tests pass locally - [ ] I have added appropriate error handling - [ ] I have added or updated documentation as needed ## Additional context <!-- Add any other context, implementation notes, or design decisions --> Signed-off-by: Radoslav Dimitrov <[email protected]>
1 parent 4e11b81 commit dd3008d

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ check: dev-down lint validate test-all ## Run all checks (lint, validate, unit t
7676

7777
# Development targets
7878
dev-compose: ## Start development environment with Docker Compose (builds image automatically)
79+
GIT_COMMIT=$$(git rev-parse HEAD) \
80+
GIT_COMMIT_SHORT=$$(git rev-parse --short HEAD) \
81+
BUILD_TIME=$$(date -u +%Y-%m-%dT%H:%M:%SZ) \
7982
docker compose up --build
8083

8184
dev-down: ## Stop development environment

docker-compose.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ services:
55
container_name: registry
66
build:
77
dockerfile: Dockerfile
8+
args:
9+
- VERSION=dev-${GIT_COMMIT_SHORT:-unknown}
10+
- GIT_COMMIT=${GIT_COMMIT:-unknown}
11+
- BUILD_TIME=${BUILD_TIME:-unknown}
812
depends_on:
913
postgres:
1014
condition: service_healthy

0 commit comments

Comments
 (0)