forked from Checkmk/checkmk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
510 lines (438 loc) · 19.6 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
# Copyright (C) 2019 Checkmk GmbH - License: GNU General Public License v2
# This file is part of Checkmk (https://checkmk.com). It is subject to the terms and
# conditions defined in the file COPYING, which is part of this source code package.
#
include defines.make
include artifacts.make
NAME := check_mk
PREFIX := /usr
BINDIR := $(PREFIX)/bin
CONFDIR := /etc/$(NAME)
LIBDIR := $(PREFIX)/lib/$(NAME)
DIST_ARCHIVE := check-mk-$(EDITION)-$(OMD_VERSION).tar.gz
TAROPTS := --owner=root --group=root --exclude=.svn --exclude=*~ \
--exclude=.gitignore --exclude=*.swp --exclude=.f12 \
--exclude=__pycache__ --exclude=*.pyc
# We could add clang's -Wshorten-64-to-32 and g++'c/clang's -Wsign-conversion here.
CXX_FLAGS := -gdwarf-4 -O3 -Wall -Wextra
export DOXYGEN := doxygen
ARTIFACT_STORAGE := https://artifacts.lan.tribe29.com
# TODO: Prefixing the command with the environment variable breaks xargs usage below!
PIPENV := PIPENV_PYPI_MIRROR=$(PIPENV_PYPI_MIRROR) scripts/run-pipenv
BLACK := scripts/run-black
LIVESTATUS_API_SOURCES := api/c++/{Makefile,*.{h,cc}} \
api/perl/* \
api/python/{README,*.py}
WERKS := $(wildcard .werks/[0-9]*)
JAVASCRIPT_SOURCES := $(filter-out %_min.js, \
$(wildcard \
$(foreach edir,. enterprise managed, \
$(foreach subdir,* */* */*/* */*/*/*,$(edir)/web/htdocs/js/$(subdir).[jt]s))))
SCSS_SOURCES := $(wildcard \
$(foreach edir,. enterprise managed, \
$(foreach subdir,* */*,$(edir)/web/htdocs/themes/$(subdir)/*.scss)))
PNG_FILES := $(wildcard $(addsuffix /*.png,web/htdocs/images web/htdocs/images/icons enterprise/web/htdocs/images enterprise/web/htdocs/images/icons managed/web/htdocs/images managed/web/htdocs/images/icons))
RRDTOOL_VERS := $(shell egrep -h "RRDTOOL_VERS\s:=\s" omd/packages/rrdtool/rrdtool.make | sed 's/RRDTOOL_VERS\s:=\s//')
WEBPACK_MODE ?= production
OPENAPI_SPEC := web/htdocs/openapi/checkmk.yaml
LOCK_FD := 200
LOCK_PATH := .venv.lock
PY_PATH := .venv/bin/python
ifneq ("$(wildcard $(PY_PATH))","")
PY_VIRT_MAJ_MIN := $(shell "${PY_PATH}" -c "from sys import version_info as v; print(f'{v.major}.{v.minor}')")
endif
.PHONY: announcement all build check check-binaries check-permissions check-version \
clean css dist documentation \
format format-c test-format-c format-python format-shell \
format-js GTAGS help install iwyu mrproper mrclean optimize-images \
packages setup setversion tidy version skel openapi \
protobuf-files
help:
@echo "setup --> Prepare system for development and building"
@echo "make dist --> Create source tgz for later building of rpm/deb and livestatus tgz"
@echo "make rpm --> Create rpm package"
@echo "make deb --> Create deb package"
@echo "make cma --> Create cma package"
@echo "make version --> Switch to new version"
rpm:
$(MAKE) -C omd rpm
deb:
$(MAKE) -C omd deb
cma:
$(MAKE) -C omd cma
check: check-permissions check-binaries check-version
check-permissions:
@echo -n "Checking permissions... with find -not -perm -444..." && [ -z "$$(find -not -perm -444)" ] && echo OK
check-binaries:
@if [ -z "$(SKIP_SANITY_CHECKS)" ]; then \
echo -n "Checking precompiled binaries..." && file agents/waitmax | grep 32-bit >/dev/null && echo OK ; \
fi
check-version:
@sed -n 1p ChangeLog | fgrep -qx '$(VERSION):' || { \
echo "Version $(VERSION) not listed at top of ChangeLog!" ; \
false ; }
check-setup:
echo "From here on we check the successful setup of some parts ..."
@if [[ ":$(PATH):" != *":$(HOME)/.local/bin:"* ]]; then \
echo "Your PATH is missing '~/.local/bin' to work properly with pipenv."; \
exit 1; \
else \
echo "Checks passed"; \
fi
$(SOURCE_BUILT_LINUX_AGENTS):
$(MAKE) -C agents $@
ifeq ($(ENTERPRISE),yes)
$(REPO_PATH)/agents/plugins/cmk-update-agent:
$(MAKE) -C enterprise agents/plugins/cmk-update-agent
$(REPO_PATH)/agents/plugins/cmk-update-agent-32:
$(MAKE) -C enterprise agents/plugins/cmk-update-agent-32
endif
$(SOURCE_BUILT_OHM) $(SOURCE_BUILT_WINDOWS):
@echo "ERROR: Should have already been built by Windows node jobs"
@echo "If you don't need the windows artifacts, you can use "
@echo "'scripts/fake-windows-artifacts' to continue with stub files"
@exit 1
# Is executed by our build environment from a "git archive" snapshot and during
# RPM building to create the source tar.gz for the RPM build process.
# Would use --exclude-vcs-ignores but that's available from tar 1.29 which
# is currently not used by most distros
# Would also use --exclude-vcs, but this is also not available
# And --transform is also missing ...
dist: $(LIVESTATUS_INTERMEDIATE_ARCHIVE) $(SOURCE_BUILT_AGENTS) $(SOURCE_BUILT_AGENT_UPDATER) protobuf-files $(JAVASCRIPT_MINI) $(THEME_RESOURCES)
$(MAKE) -C agents/plugins
set -e -o pipefail ; EXCLUDES= ; \
if [ -d .git ]; then \
git rev-parse --short HEAD > COMMIT ; \
for X in $$(git ls-files --directory --others -i --exclude-standard) ; do \
if [[ ! "$(DIST_DEPS)" =~ (^|[[:space:]])$$X($$|[[:space:]]) && $$X != omd/packages/mk-livestatus/mk-livestatus-$(VERSION).tar.gz && $$X != livestatus/* && $$X != enterprise/* ]]; then \
EXCLUDES+=" --exclude $${X%*/}" ; \
fi ; \
done ; \
else \
for F in $(DIST_ARCHIVE) enterprise/agents/plugins/{build,build-32,src} enterprise/agents/plugins/{build,build-32,src} enterprise/agents/winbuild; do \
EXCLUDES+=" --exclude $$F" ; \
done ; \
fi ; \
if [ -d check-mk-$(EDITION)-$(OMD_VERSION) ]; then \
rm -rf check-mk-$(EDITION)-$(OMD_VERSION) ; \
fi ; \
mkdir check-mk-$(EDITION)-$(OMD_VERSION) ; \
tar -c --wildcards \
$(TAROPTS) \
--exclude check-mk-$(EDITION)-$(OMD_VERSION) \
--exclude .git \
--exclude .gitignore \
--exclude .gitmodules \
--exclude .gitattributes \
$$EXCLUDES \
* .werks | tar x -C check-mk-$(EDITION)-$(OMD_VERSION)
if [ -f COMMIT ]; then \
rm COMMIT ; \
fi
tar -cz --wildcards -f $(DIST_ARCHIVE) \
$(TAROPTS) \
check-mk-$(EDITION)-$(OMD_VERSION)
rm -rf check-mk-$(EDITION)-$(OMD_VERSION)
$(CHECK_MK_RAW_PRECOMPILED_WERKS): $(WERKS)
PYTHONPATH=${PYTHONPATH}:$(REPO_PATH) $(PIPENV) run python -m cmk.utils.werks precompile .werks .werks/werks --filter-by-edition cre
$(REPO_PATH)/ChangeLog: $(CHECK_MK_RAW_PRECOMPILED_WERKS)
PYTHONPATH=${PYTHONPATH}:$(REPO_PATH) $(PIPENV) run python -m cmk.utils.werks changelog ChangeLog .werks/werks
announcement:
mkdir -p $(CHECK_MK_ANNOUNCE_FOLDER)
PYTHONPATH=${PYTHONPATH}:$(REPO_PATH) $(PIPENV) run python -m cmk.utils.werks announce .werks $(VERSION) --format=md > $(CHECK_MK_ANNOUNCE_MD)
PYTHONPATH=${PYTHONPATH}:$(REPO_PATH) $(PIPENV) run python -m cmk.utils.werks announce .werks $(VERSION) --format=txt > $(CHECK_MK_ANNOUNCE_TXT)
tar -czf $(CHECK_MK_ANNOUNCE_TAR) -C $(CHECK_MK_ANNOUNCE_FOLDER) .
packages:
$(MAKE) -C agents packages
# NOTE: Old tar versions (e.g. on CentOS 5) don't have the --transform option,
# so we do things in a slightly complicated way.
$(LIVESTATUS_INTERMEDIATE_ARCHIVE):
rm -rf mk-livestatus-$(VERSION)
mkdir -p mk-livestatus-$(VERSION)
set -o pipefail; tar chf - $(TAROPTS) -C livestatus $$(cd livestatus ; echo $(LIVESTATUS_API_SOURCES) ) | tar xf - -C mk-livestatus-$(VERSION)
set -o pipefail; tar chf - $(TAROPTS) --exclude=build packages/livestatus packages/unixcat packages/neb third_party/re2 third_party/asio third_party/googletest third_party/rrdtool | tar xf - -C mk-livestatus-$(VERSION)
tar czf omd/packages/mk-livestatus/mk-livestatus-$(VERSION).tar.gz $(TAROPTS) mk-livestatus-$(VERSION)
rm -rf mk-livestatus-$(VERSION)
version:
[ "$$(head -c 6 /etc/issue)" = "Ubuntu" \
-o "$$(head -c 16 /etc/issue)" = "Debian GNU/Linux" ] \
|| { echo 'You are not on the reference system!' ; exit 1; }
@newversion=$$(dialog --stdout --inputbox "New Version:" 0 0 "$(VERSION)") ; \
if [ -n "$$newversion" ] ; then $(MAKE) NEW_VERSION=$$newversion setversion ; fi
# NOTE: CMake accepts only up to 4 non-negative integer version parts, so we
# replace any character (like 'p' or 'b') with a dot. Not completely correct,
# but better than nothing. We have to rethink this setversion madness, anyway.
setversion:
sed -ri 's/^(VERSION[[:space:]]*:?= *).*/\1'"$(NEW_VERSION)/" defines.make
sed -i 's/^__version__ = ".*"$$/__version__ = "$(NEW_VERSION)"/' cmk/utils/version.py bin/livedump
sed -i 's/^set(CMK_VERSION .*)/set(CMK_VERSION ${NEW_VERSION})/' packages/neb/CMakeLists.txt
$(MAKE) -C agents NEW_VERSION=$(NEW_VERSION) setversion
$(MAKE) -C docker_image NEW_VERSION=$(NEW_VERSION) setversion
ifeq ($(ENTERPRISE),yes)
sed -i 's/^set(CMK_VERSION .*)/set(CMK_VERSION ${NEW_VERSION})/' packages/cmc/CMakeLists.txt
$(MAKE) -C enterprise NEW_VERSION=$(NEW_VERSION) setversion
endif
$(OPENAPI_SPEC): $(shell find cmk/gui/plugins/openapi $(wildcard cmk/gui/cee/plugins/openapi) -name "*.py")
@export PYTHONPATH=${REPO_PATH} ; \
export TMPFILE=$$(mktemp); \
$(PIPENV) run python -m cmk.gui.openapi > $$TMPFILE && \
mv $$TMPFILE $@
openapi-clean:
rm -f $(OPENAPI_SPEC)
openapi: $(OPENAPI_SPEC)
optimize-images:
@if type pngcrush >/dev/null 2>&1; then \
for F in $(PNG_FILES); do \
echo "Optimizing $$F..." ; \
pngcrush -q -rem alla -brute $$F $$F.opt ; \
mv $$F.opt $$F; \
done ; \
else \
echo "Missing pngcrush, not optimizing images! (run \"make setup\" to fix this)" ; \
fi
# TODO: The --unsafe-perm was added because the CI executes this as root during
# tests and building versions. Once we have the then build system this should not
# be necessary anymore.
#
# NOTE 1: What we actually want are grouped targets, but this would require GNU
# make >= 4.3, so we use the common workaround of an intermediate target.
#
# NOTE 2: NPM people have a totally braindead idea about reproducible builds
# which almost all other people consider a bug, so we have to touch our target
# files. Read https://github.com/npm/npm/issues/20439 and be amazed...
#
# NOTE 3: NPM sometimes terminates with a very unhelpful "npm ERR! cb() never
# called!" message, where the underlying reason seems to be quite obscure, see
# https://npm.community/t/crash-npm-err-cb-never-called/858.
#
# NOTE 4: The sed call is to get the same "resolved" entries independent of the
# used registry. The resolved entry is only a hint for npm.
.INTERMEDIATE: .ran-npm
node_modules/.bin/webpack: .ran-npm
node_modules/.bin/prettier: .ran-npm
.ran-npm: package.json package-lock.json
@echo "npm version: $$(npm --version)"
npm --version | grep "^$(NPM_VERSION)\." >/dev/null 2>&1
@echo "node version: $$(node --version)"
node --version | grep "^v$(NODEJS_VERSION)\." >/dev/null 2>&1
@echo "open file descriptor limit (soft): $$(ulimit -Sn)"
@echo "open file descriptor limit (hard): $$(ulimit -Hn)"
@if curl --silent --output /dev/null --head '${ARTIFACT_STORAGE}/#browse/browse:npm-proxy'; then \
REGISTRY=--registry=${ARTIFACT_STORAGE}/repository/npm-proxy/ ; \
export SASS_BINARY_SITE='${ARTIFACT_STORAGE}/repository/archives/'; \
echo "Installing from local registry ${ARTIFACT_STORAGE}" ; \
else \
REGISTRY= ; \
echo "Installing from public registry" ; \
fi ; \
npm ci --yes --audit=false --unsafe-perm $$REGISTRY
sed -i 's#"resolved": "https://artifacts.lan.tribe29.com/repository/npm-proxy/#"resolved": "https://registry.npmjs.org/#g' package-lock.json
touch node_modules/.bin/webpack node_modules/.bin/prettier
# NOTE 1: Match anything patterns % cannot be used in intermediates. Therefore, we
# list all targets separately.
#
# NOTE 2: For the touch command refer to the notes above.
#
# NOTE 3: The cma_facelift.scss target is used to generate a css file for the virtual
# appliance. It is called from the cma git's makefile and the built css file is moved
# to ~/git/cma/skel/usr/share/cma/webconf/htdocs/
.INTERMEDIATE: .ran-webpack
$(JAVASCRIPT_MINI): .ran-webpack
$(THEME_CSS_FILES): .ran-webpack
.ran-webpack: node_modules/.bin/webpack webpack.config.js postcss.config.js $(JAVASCRIPT_SOURCES) $(SCSS_SOURCES)
WEBPACK_MODE=$(WEBPACK_MODE) ENTERPRISE=$(ENTERPRISE) MANAGED=$(MANAGED) CLOUD=$(CLOUD) SAAS=$(SAAS) node_modules/.bin/webpack --mode=$(WEBPACK_MODE:quick=development)
touch $(JAVASCRIPT_MINI) $(THEME_CSS_FILES)
# TODO(sp) The target below is not correct, we should not e.g. remove any stuff
# which is needed to run configure, this should live in a separate target. In
# fact, we should really clean up all this cleaning-chaos and finally follow the
# GNU standards here (see "Standard Targets for Users",
# https://www.gnu.org/prep/standards/html_node/Standard-Targets.html).
clean:
$(MAKE) -C omd clean
rm -rf dist.tmp rpm.topdir *.rpm *.deb *.exe \
omd/packages/mk-livestatus/mk-livestatus-*.tar.gz \
$(NAME)-*.tar.gz *~ counters autochecks \
precompiled cache web/htdocs/js/*_min.js \
web/htdocs/themes/*/theme.css \
.werks/werks \
ChangeLog \
announce*
css: .ran-webpack
EXCLUDE_PROPER= \
--exclude="**/.vscode" \
--exclude="**/.idea" \
--exclude=".werks/.last" \
--exclude=".werks/.my_ids"
EXCLUDE_CLEAN=$(EXCLUDE_PROPER) \
--exclude=".venv" \
--exclude=".venv.lock" \
--exclude=".cargo" \
--exclude="node_modules"
# The list of files and folders to be protected from remove after "buildclean" is called
# Rust dirs are kept due to heavy load when compiled: .cargo, controller
AGENT_CTL_TARGET_PATH=packages/cmk-agent-ctl/target
SQL_CHECK_TARGET_PATH=packages/database_checks/sql_check/target
EXCLUDE_BUILD_CLEAN=$(EXCLUDE_CLEAN) \
--exclude="doc/plugin-api/build" \
--exclude=".cargo" \
--exclude=$(AGENT_CTL_TARGET_PATH) \
--exclude=$(SQL_CHECK_TARGET_PATH) \
--exclude="agents/plugins/*_2.py" \
--exclude="agents/plugins/*.py.checksum"
mrproper:
git clean -d --force -x $(EXCLUDE_PROPER)
mrclean:
git clean -d --force -x $(EXCLUDE_CLEAN)
# The target is reserved for a future use
workspaceclean:
# Stub
# Used by our version build (buildscripts/scripts/build-cmk-version.jenkins)
# for cleaning up while keeping some build artifacts between version builds.
# This helps to speed up "make dist"
buildclean:
git clean -d --force -x $(EXCLUDE_BUILD_CLEAN)
setup:
# librrd-dev is still needed by the python rrd package we build in our virtual environment
sudo apt-get install \
build-essential \
clang-$(CLANG_VERSION) \
clang-format-$(CLANG_VERSION) \
clang-tidy-$(CLANG_VERSION) \
clang-tools-$(CLANG_VERSION) \
clangd-$(CLANG_VERSION) \
cmake \
curl \
direnv \
doxygen \
figlet \
gawk \
gdebi \
git \
git-svn \
gitk \
ksh \
libclang-$(CLANG_VERSION)-dev \
libjpeg-dev \
libkrb5-dev \
libldap2-dev \
libmariadb-dev-compat \
libpango1.0-dev \
libpcap-dev \
librrd-dev \
libsasl2-dev \
libsqlite3-dev \
libtool-bin \
libxml2-dev \
libreadline-dev \
libxml2-dev \
libxslt-dev \
libpq-dev \
libreadline-dev \
lld-$(CLANG_VERSION) \
lldb-$(CLANG_VERSION) \
musl-tools \
p7zip-full \
patchelf \
pngcrush \
python3-pip \
python3-venv \
shellcheck \
valgrind \
zlib1g-dev
if type pyenv >/dev/null 2>&1 && pyenv shims --short | grep '^pipenv$$'; then \
CMD="pyenv exec" ; \
else \
CMD="" ; \
fi ; \
$$CMD pip3 install --user --upgrade \
pip \
pipenv=="$(PIPENV_VERSION)" \
virtualenv=="$(VIRTUALENV_VERSION)" \
wheel
if ! type rustup >/dev/null 2>&1; then \
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh; \
source $$HOME/.cargo/env; \
fi ; \
rustup target add x86_64-unknown-linux-musl
$(MAKE) -C web setup
$(MAKE) -C docker_image setup
$(MAKE) -C locale setup
$(MAKE) check-setup
linesofcode:
@wc -l $$(find -type f -name "*.py" -o -name "*.js" -o -name "*.cc" -o -name "*.h" -o -name "*.css" | grep -v openhardwaremonitor | grep -v jquery ) | sort -n
protobuf-files:
ifeq ($(ENTERPRISE),yes)
$(MAKE) -C enterprise protobuf-files
endif
format: format-python format-c format-shell format-js format-css format-bazel
format-c:
packages/livestatus/run --format
packages/unixcat/run --format
packages/neb/run --format
ifeq ($(ENTERPRISE),yes)
packages/cmc/run --format
endif
test-format-c:
packages/livestatus/run --check-format
packages/unixcat/run --check-format
packages/neb/run --check-format
ifeq ($(ENTERPRISE),yes)
packages/cmc/run --check-format
endif
format-python: format-python-isort format-python-black
format-python-isort:
if test -z "$$PYTHON_FILES"; then ./scripts/find-python-files; else echo "$$PYTHON_FILES"; fi | \
PIPENV_PYPI_MIRROR=$(PIPENV_PYPI_MIRROR)/simple xargs -n 1500 scripts/run-pipenv run isort --settings-path pyproject.toml
format-python-black:
if test -z "$$PYTHON_FILES"; then ./scripts/find-python-files; else echo "$$PYTHON_FILES"; fi | \
xargs -n 1500 $(BLACK)
format-shell:
$(MAKE) -C tests format-shell
what-gerrit-makes:
$(MAKE) -C tests what-gerrit-makes
format-js:
scripts/run-prettier --no-color --ignore-path ./.prettierignore --write "{{enterprise/web,web}/htdocs/js/**/,}*.{j,t}s"
format-css:
scripts/run-prettier --no-color --ignore-path ./.prettierignore --write "web/htdocs/themes/**/*.scss"
format-bazel:
scripts/run-buildifier --lint=fix --mode=fix
documentation:
echo Nothing to do here remove this target
sw-documentation-docker:
scripts/run-in-docker.sh scripts/run-pipenv run make -C doc/documentation html
.python-$(PYTHON_MAJOR_DOT_MINOR)-stamp:
$(RM) .python-*-stamp
touch $@
# TODO: pipenv and make don't really cooperate nicely: Locking alone already
# creates a virtual environment with setuptools/pip/wheel. This could lead to a
# wrong up-to-date status of it later, so let's remove it here. What we really
# want is a check if the contents of .venv match the contents of Pipfile.lock.
# We should do this via some move-if-change Kung Fu, but for now rm suffices.
Pipfile.lock: Pipfile
@if [ "${CI}" == "true" ]; then \
echo "A locking of Pipfile.lock is needed, but we're executed in the CI, where this should not be done."; \
echo "It seems you forgot to commit the new Pipfile.lock. Regenerate Pipfile.lock with e.g.:"; \
echo "make --what-if Pipfile Pipfile.lock"; \
exit 1; \
fi
@( \
echo "Locking Python requirements..." ; \
flock $(LOCK_FD); \
( SKIP_MAKEFILE_CALL=1 $(PIPENV) lock --python $(PYTHON_MAJOR_DOT_MINOR) ) || ( $(RM) -r .venv ; exit 1 ) \
) $(LOCK_FD)>$(LOCK_PATH); \
# Remake .venv everytime Pipfile or Pipfile.lock are updated. Using the 'sync'
# mode installs the dependencies exactly as specified in the Pipfile.lock.
# This is extremely fast since the dependencies do not have to be resolved.
# Cleanup partially created pipenv. This makes us able to automatically repair
# broken virtual environments which may have been caused by network issues.
.venv: Pipfile.lock .python-$(PYTHON_MAJOR_DOT_MINOR)-stamp
@( \
echo "Creating .venv..." ; \
flock $(LOCK_FD); \
if [ "$(CI)" == "true" ] || [ "$(PY_VIRT_MAJ_MIN)" != "$(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)" ]; then \
echo "CI is $(CI), Python version of .venv is $(PY_VIRT_MAJ_MIN), Target python version is $(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)"; \
echo "Cleaning up .venv before sync..."; \
$(RM) -r .venv; \
fi; \
( SKIP_MAKEFILE_CALL=1 VIRTUAL_ENV="" $(PIPENV) sync --python $(PYTHON_MAJOR_DOT_MINOR) --dev && touch .venv ) || ( $(RM) -r .venv ; exit 1 ) \
) $(LOCK_FD)>$(LOCK_PATH)