Skip to content

Commit e659203

Browse files
committed
change source of truth to version.py
1 parent 55c9b9c commit e659203

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

Makefile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,8 @@ CURRENT_DIR = ${CURDIR}
44
BUILD_DIR ?= $(CURRENT_DIR)/build
55
PYTHON_BIN ?= python3
66

7-
API_VERSION := $(shell grep "^api_version" $(CURRENT_DIR)/web/api/py/codechecker_api/setup.py | cut -d"'" -f2)
8-
VENV_API_VERSION := $(shell \
9-
if [ -f $(CURRENT_DIR)/venv_dev/bin/pip ]; then \
10-
$(CURRENT_DIR)/venv_dev/bin/pip show codechecker-api 2>/dev/null | grep "^Version:" | cut -d' ' -f2; \
11-
elif [ -f $(CURRENT_DIR)/venv/bin/pip ]; then \
12-
$(CURRENT_DIR)/venv/bin/pip show codechecker-api 2>/dev/null | grep "^Version:" | cut -d' ' -f2; \
13-
else \
14-
echo "no venv found"; \
15-
fi)
7+
API_VERSION := $(shell python3 -c "exec(open('$(CURRENT_DIR)/web/codechecker_web/shared/version.py').read()); print(f'{max(SUPPORTED_VERSIONS)}.{SUPPORTED_VERSIONS[max(SUPPORTED_VERSIONS)]}.0')")
8+
VENV_API_VERSION := $(shell pip show codechecker-api 2>/dev/null | grep "^Version:" | cut -d' ' -f2)
169

1710
CC_BUILD_DIR = $(BUILD_DIR)/CodeChecker
1811
CC_BUILD_BIN_DIR = $(CC_BUILD_DIR)/bin

0 commit comments

Comments
 (0)