Skip to content

Commit a080bd1

Browse files
authored
break: only publish version-like tags (pypa#1814)
1 parent b3bee7e commit a080bd1

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

deploy.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,20 @@ fi
1212
set -x
1313

1414
TAG="quay.io/pypa/${POLICY}_${PLATFORM}"
15-
COMMIT_ABBREV_SHA=$(git show -s --format=%h "${COMMIT_SHA}")
1615
COMMIT_DATE=$(git show -s --format=%cd --date=short "${COMMIT_SHA}")
17-
BUILD_ID=${COMMIT_DATE}-${COMMIT_ABBREV_SHA}
18-
# Dependabot does not work with the BUILD_ID format
19-
# Use a version like tag
2016
if eval "$(git rev-parse --is-shallow-repository)"; then
2117
git fetch --unshallow
2218
fi
2319
BUILD_NUMBER=$(git rev-list "--since=${COMMIT_DATE}T00:00:00Z" --first-parent --count "${COMMIT_SHA}")
24-
BUILD_ID2=${COMMIT_DATE//-/.}-${BUILD_NUMBER}
20+
BUILD_ID=${COMMIT_DATE//-/.}-${BUILD_NUMBER} # This should be a version like tag to allow dependabot updates
2521

2622
docker tag "${TAG}:${COMMIT_SHA}" "${TAG}:${BUILD_ID}"
27-
docker tag "${TAG}:${COMMIT_SHA}" "${TAG}:${BUILD_ID2}"
2823
docker tag "${TAG}:${COMMIT_SHA}" "${TAG}:latest"
2924

3025
set +x
3126

3227
if [ $DRY_RUN -eq 0 ]; then
3328
docker login -u "${QUAY_USERNAME}" -p "${QUAY_PASSWORD}" quay.io
3429
docker push "${TAG}:${BUILD_ID}"
35-
docker push "${TAG}:${BUILD_ID2}"
3630
docker push "${TAG}:latest"
3731
fi

0 commit comments

Comments
 (0)