forked from Checkmk/checkmk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
defines.make
110 lines (91 loc) · 3.84 KB
/
defines.make
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
# 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.
#
REPO_PATH := $(realpath $(dir $(lastword $(MAKEFILE_LIST))))
EDITION := raw
EDITION_SHORT := cre
ifneq (,$(wildcard $(REPO_PATH)/enterprise))
ENTERPRISE := yes
EDITION := enterprise
EDITION_SHORT := cee
else
ENTERPRISE := no
endif
ifneq (,$(wildcard $(REPO_PATH)/cloud))
CLOUD := yes
EDITION := cloud
EDITION_SHORT := cce
else
CLOUD := no
endif
ifneq (,$(wildcard $(REPO_PATH)/managed))
MANAGED := yes
EDITION := managed
EDITION_SHORT := cme
else
MANAGED := no
endif
ifneq (,$(wildcard $(REPO_PATH)/saas))
SAAS := yes
EDITION := saas
EDITION_SHORT := cse
else
SAAS := no
endif
VERSION := 2.3.0b1
OMD_VERSION := $(VERSION).$(EDITION_SHORT)
# Do not use the the ".c?e" EDITION_SHORT suffix, the edition is part of the package name
PKG_VERSION := $(VERSION)
# Currently only used for the OMD package build cache. We did not want to use
# the branch name, because we want to re-use a single cache also for derived sandbox
# branches (1.7.0i1 -> 1.7.0).
# This needs to be changed in the master branch every time a stable branch is forked.
BRANCH_VERSION := 2.3.0
# This automatism did not work well in all cases. There were daily build jobs that used
# e.g. 2020.02.08 as BRANCH_VERSION, even if they should use 1.7.0
#BRANCH_VERSION := $(shell echo "$(VERSION)" | sed -E 's/^([0-9]+.[0-9]+.[0-9]+).*$$/\1/')
# In case of "master daily builds" we get the DATE as BRANCH_VERSION, which is
# not what we want. TODO: Find a solution for this
#ifeq ($(BRANCH_VERSION),$(shell date +%Y.%m.%d))
# BRANCH_VERSION := 1.7.0
#endif
SHELL := /bin/bash
CLANG_VERSION := 17
PLANTUML_JAR_PATH := $(REPO_PATH)/third_party/plantuml
# In our CI we use this compiler, but we are not restricted to this exact version
GCC_VERSION_MAJOR := 13
GCC_VERSION_MINOR := 2
GCC_VERSION_PATCHLEVEL := 0
GCC_VERSION := ${GCC_VERSION_MAJOR}.${GCC_VERSION_MINOR}.${GCC_VERSION_PATCHLEVEL}
# NOTE: When you update the Python version, please take care of the following things:
# * the python version is now centralized within bazel, see package_versions.bzl
# * update test_03_pip_interpreter_version
# * update omd/Licenses.csv, too.
# * you may need to regenerate the Pipfile.lock with "make --what-if Pipfile Pipfile.lock"
PYTHON_VERSION := $(shell sed -n 's|^PYTHON_VERSION = \"\(\S*\)\"$$|\1|p' $(REPO_PATH)/package_versions.bzl)
# convenience stuff derived from PYTHON_VERSION
PY_ARRAY := $(subst ., ,$(PYTHON_VERSION))
PYTHON_VERSION_MAJOR := $(word 1,$(PY_ARRAY))
PYTHON_VERSION_MINOR := $(word 2,$(PY_ARRAY))
PYTHON_VERSION_PATCH := $(word 3,$(PY_ARRAY))
PYTHON_MAJOR_MINOR := $(PYTHON_VERSION_MAJOR)$(PYTHON_VERSION_MINOR)
PYTHON_MAJOR_DOT_MINOR := $(PYTHON_VERSION_MAJOR).$(PYTHON_VERSION_MINOR)
AGENT_PLUGIN_PYTHON_VERSIONS := 2.7 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11
# Needed for bootstrapping CI and development environments
PIPENV_VERSION := 2023.2.18
VIRTUALENV_VERSION := 20.20.0
NODEJS_VERSION := 18
NPM_VERSION := 10
# PyPi Mirror Configuration
# By default our internal Python mirror is used.
# To use the official Python mirror, please export `USE_EXTERNAL_PIPENV_MIRROR=true`.
EXTERNAL_PYPI_MIRROR := https://pypi.org/simple
INTERNAL_PYPI_MIRROR := $(shell sed -n 's|^INTERNAL_PYPI_MIRROR = \"\(\S*\)\"$$|\1|p' $(REPO_PATH)/static_variables.bzl)
ifeq (true,${USE_EXTERNAL_PIPENV_MIRROR})
PIPENV_PYPI_MIRROR := $(EXTERNAL_PYPI_MIRROR)
else
PIPENV_PYPI_MIRROR := $(INTERNAL_PYPI_MIRROR)
endif
print-%:
@echo '$($*)'