Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 1dae5bf

Browse files
committed
Revert "allow Makefile vars including REQUIREMENTS_TAG to be overridden (#1273)"
This reverts commit 6bb21bf. It seems that this has broken PRs and mergequeue merges to main.
1 parent 6bb21bf commit 1dae5bf

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

Makefile

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
sha ?= $(shell git rev-parse --short=7 HEAD)
2-
long_sha ?= $(shell git rev-parse HEAD)
3-
merge_sha ?= $(shell git merge-base HEAD^ origin/main)
1+
sha := $(shell git rev-parse --short=7 HEAD)
2+
long_sha := $(shell git rev-parse HEAD)
3+
merge_sha := $(shell git merge-base HEAD^ origin/main)
44
release_version := `cat VERSION`
55
build_date ?= $(shell git show -s --date=iso8601-strict --pretty=format:%cd $$sha)
6-
branch ?= $(shell git branch | grep \* | cut -f2 -d' ')
7-
epoch ?= $(shell date +"%s")
6+
branch = $(shell git branch | grep \* | cut -f2 -d' ')
7+
epoch := $(shell date +"%s")
88
AR_REPO ?= codecov/api
99
DOCKERHUB_REPO ?= codecov/self-hosted-api
10-
REQUIREMENTS_TAG ?= requirements-v1-$(shell sha1sum uv.lock | cut -d ' ' -f 1)-$(shell sha1sum docker/Dockerfile.requirements | cut -d ' ' -f 1)
11-
VERSION ?= release-${sha}
10+
REQUIREMENTS_TAG := requirements-v1-$(shell sha1sum uv.lock | cut -d ' ' -f 1)-$(shell sha1sum docker/Dockerfile.requirements | cut -d ' ' -f 1)
11+
VERSION := release-${sha}
1212
CODECOV_UPLOAD_TOKEN ?= "notset"
1313
CODECOV_STATIC_TOKEN ?= "notset"
1414
CODECOV_URL ?= "https://api.codecov.io"
@@ -19,9 +19,6 @@ export CODECOV_TOKEN=${CODECOV_UPLOAD_TOKEN}
1919
API_DOMAIN ?= api
2020
PROXY_NETWORK ?= api_default
2121

22-
DEFAULT_REQS_TAG := requirements-v1-$(shell sha1sum uv.lock | cut -d ' ' -f 1)-$(shell sha1sum docker/Dockerfile.requirements | cut -d ' ' -f 1)
23-
REQUIREMENTS_TAG ?= ${DEFAULT_REQS_TAG}
24-
2522
# We allow this to be overridden so that we can run `pytest` from this directory
2623
# but have the junit file use paths relative to a parent directory. This will
2724
# help us move to a monorepo.
@@ -73,12 +70,6 @@ lint.check:
7370
ruff format --check
7471

7572
build.requirements:
76-
# If make was given a different requirements tag, we assume a suitable image
77-
# was already built (e.g. by umbrella) and don't want to build this one.
78-
ifneq (${REQUIREMENTS_TAG},${DEFAULT_REQS_TAG})
79-
echo "Error: building api reqs image despite another being provided"
80-
exit 1
81-
endif
8273
# if docker pull succeeds, we have already build this version of
8374
# requirements.txt. Otherwise, build and push a version tagged
8475
# with the hash of this requirements.txt

0 commit comments

Comments
 (0)