Sfoglia il codice sorgente

fix(deploy): 部署脚本 tag 格式与 Makefile 对齐,加入 commit hash 和 dirty 标记

master
fengsilin 1 settimana fa
parent
commit
a72d76522f
2 ha cambiato i file con 8 aggiunte e 2 eliminazioni
  1. +4
    -1
      scripts/deploy-test.sh
  2. +4
    -1
      scripts/deploy.sh

+ 4
- 1
scripts/deploy-test.sh Vedi File

@@ -69,7 +69,10 @@ if [ "$NO_BUILD" = false ]; then
cd "$PROJECT_DIR"

BRANCH=$(git rev-parse --abbrev-ref HEAD | sed 's/\//-/g')
TAG="$(date +%Y%m%d%H%M)-${BRANCH}"
COMMIT_SHORT=$(git rev-parse --short HEAD)
GIT_DIRTY=""
git diff --quiet && git diff --cached --quiet 2>/dev/null || GIT_DIRTY="-dirty"
TAG="$(date +%Y%m%d%H%M)-${BRANCH}-${COMMIT_SHORT}${GIT_DIRTY}"
IMAGE="${DOCKER_REGISTRY}:${TAG}"

info "分支: ${BRANCH}"


+ 4
- 1
scripts/deploy.sh Vedi File

@@ -72,7 +72,10 @@ if [ "$NO_BUILD" = false ]; then
cd "$PROJECT_DIR"

BRANCH=$(git rev-parse --abbrev-ref HEAD | sed 's/\//-/g')
TAG="$(date +%Y%m%d%H%M)-${BRANCH}"
COMMIT_SHORT=$(git rev-parse --short HEAD)
GIT_DIRTY=""
git diff --quiet && git diff --cached --quiet 2>/dev/null || GIT_DIRTY="-dirty"
TAG="$(date +%Y%m%d%H%M)-${BRANCH}-${COMMIT_SHORT}${GIT_DIRTY}"
IMAGE="${DOCKER_REGISTRY}:${TAG}"

info "分支: ${BRANCH}"


Caricamento…
Annulla
Salva