mirror of
https://github.com/dalbodeule/hop-gate.git
synced 2025-12-12 06:40:11 +09:00
[feat](build): add versioned Docker image build script and version injection
- Introduced `tools/build_server_image.sh` for building versioned server images with support for multi-arch builds. - Added `VERSION` injection via `-ldflags` in Dockerfile and Go binaries for both server and client. - Updated workflows and Makefile to ensure consistent version tagging during builds.
This commit is contained in:
4
Makefile
4
Makefile
@@ -18,7 +18,9 @@ BIN_DIR := ./bin
|
||||
SERVER_BIN := $(BIN_DIR)/hop-gate-server
|
||||
CLIENT_BIN := $(BIN_DIR)/hop-gate-client
|
||||
|
||||
VERSION ?= $(shell git describe --tags --dirty --always 2>/dev/null || echo dev)
|
||||
# VERSION 은 현재 커밋의 7글자 SHA 를 사용합니다 (예: 1a2b3c4).
|
||||
# git 정보가 없으면 dev 로 fallback 합니다.
|
||||
VERSION ?= $(shell git rev-parse --short=7 HEAD 2>/dev/null || echo dev)
|
||||
|
||||
# .env 파일 로드
|
||||
include .env
|
||||
|
||||
Reference in New Issue
Block a user