Pull request 2731: ADG-12585-fix-ci
Some checks failed
build / test (macOS-latest) (push) Has been cancelled
build / test (ubuntu-latest) (push) Has been cancelled
build / test (windows-latest) (push) Has been cancelled
lint / go-lint (push) Has been cancelled
lint / eslint (push) Has been cancelled
build / build-release (push) Has been cancelled
build / notify (push) Has been cancelled
lint / notify (push) Has been cancelled

Squashed commit of the following:

commit 7abc4da755df09e2975b552cfe8fe30e94766745
Merge: cafaf7d56 e8e328709
Author: Maksim Kazantsev <m.kazantsev@adguard.com>
Date:   Fri Jul 24 15:12:47 2026 +0300

    Merge branch 'master' into ADG-12585-fix-ci

commit cafaf7d5678ef241d3284b4afca673aae0cb9a4b
Author: Maksim Kazantsev <m.kazantsev@adguard.com>
Date:   Fri Jul 24 14:45:51 2026 +0300

    bamboo-specs: fmt;

commit 5c1cb2be154dbf362c07b5470e7cbca9f69f590a
Author: Maksim Kazantsev <m.kazantsev@adguard.com>
Date:   Fri Jul 24 14:15:46 2026 +0300

    bamboo-specs: fmt;

commit 0497ddfa0544ce2f03e5fb54c3f80fe0a63992dd
Author: Maksim Kazantsev <m.kazantsev@adguard.com>
Date:   Fri Jul 24 13:54:20 2026 +0300

    bamboo-specs: fmt;

commit 52ab575f361698c4f463c2388cc9143b924e295a
Author: Maksim Kazantsev <m.kazantsev@adguard.com>
Date:   Fri Jul 24 13:44:28 2026 +0300

    bamboo-specs: imp docs;

commit 04b004aa816c97cdd7f4ad0077fd21541b21c7a0
Author: Maksim Kazantsev <m.kazantsev@adguard.com>
Date:   Fri Jul 24 13:40:49 2026 +0300

    bamboo-specs: fix ci;
This commit is contained in:
Maksim Kazantsev 2026-07-24 12:15:08 +00:00
parent e8e3287091
commit 5c44c4b260
2 changed files with 14 additions and 4 deletions

View file

@ -174,10 +174,17 @@
# The version.sh script queries the current state of the git
# repository, so we must explicitly checkout the revision that
# triggered the build to prevent race conditions when the master
# branch changes while this build is running.
# branch changes while this build is running. Also, pass BRANCH
# so that version.sh can determine the branch name even in
# detached HEAD states.
git checkout "${bamboo_repository_revision_number}"
version="$(env CHANNEL=${bamboo_channel} sh ./scripts/make/version.sh)"
version="$(
env \
BRANCH=${bamboo_planRepository_branchName} \
CHANNEL=${bamboo_channel} \
sh ./scripts/make/version.sh
)"
readonly version
docker info

View file

@ -147,8 +147,11 @@ case "$channel" in
last_tag="$(git describe --abbrev=0)"
readonly last_tag
# current_branch is the name of the branch currently checked out.
current_branch="$(git rev-parse --abbrev-ref HEAD)"
# current_branch is the name of the branch. Prefer the BRANCH
# environment variable when set, since 'git rev-parse --abbrev-ref HEAD'
# returns 'HEAD' in detached HEAD states (e.g. after 'git checkout
# <commit>').
current_branch="${BRANCH:-$(git rev-parse --abbrev-ref HEAD)}"
readonly current_branch
# The branch should be named like: