forked from open-telemetry/opentelemetry-network
-
Notifications
You must be signed in to change notification settings - Fork 0
/
version.sh
executable file
·31 lines (25 loc) · 1.27 KB
/
version.sh
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
#!/bin/sh
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
set -e
# -----
# Major and minor versions influence customer vetting processes and level
# of perceived trust in an implementation -- please discuss before bumping these.
export EBPF_NET_MAJOR_VERSION='0'
export EBPF_NET_MINOR_VERSION='9'
# -----
# Build number is incremented automatically, so we can release directly from
# CI/CD, releasing the same exact binaries and containers that we already tested
# in dev/staging environements.
# COLLECTOR_BUILD_NUMBER_BASE is the commit-ish we count the build number from.
# to reset the build number, change this. Make sure this also happens together with
# bumping the major or minor versions, so there is no ambiguity with previously
# built versions.
# The commit hash must be a valid git hash in the opentelemetry-ebpf repository.
COLLECTOR_BUILD_NUMBER_BASE="3598385a6f5288ced0f7bbe9150837c4497d6bc8"
GIT_REVISION="HEAD"
# build number is the number of commits since the latest tag
EBPF_NET_COLLECTOR_BUILD_NUMBER="$(git rev-list --count "${COLLECTOR_BUILD_NUMBER_BASE}..${GIT_REVISION}")"
# adjust build number to keep the increasing order
EBPF_NET_COLLECTOR_BUILD_NUMBER="$(($EBPF_NET_COLLECTOR_BUILD_NUMBER + 4000))"
export EBPF_NET_COLLECTOR_BUILD_NUMBER