auto/config: don't set TAILS_GIT_BASE_COMMIT when building from tags
commitfa48621028b8c2436aba66bb7dcd603d6ea99479
authoranonym <anonym@riseup.net>
Sun, 31 Mar 2024 13:33:01 +0000 (31 15:33 +0200)
committeranonym <anonym@riseup.net>
Sun, 31 Mar 2024 13:39:05 +0000 (31 15:39 +0200)
tree7966209ccdf1affa6f30e2579b7b4a5cbb9421cc
parent4ede58abcb83d25c0daaf38f7fdab588c8ee3c44
auto/config: don't set TAILS_GIT_BASE_COMMIT when building from tags

Bugfix on ca1efbb01063aca434788e2bf09077b60a3a8fd7 introduced in Tails
6.0~rc1.

The condition was `[ "$GIT_BRANCH" != "$(base_branch)" ]`, and when on
a tag `$GIT_BRANCH` is unset, but `base_branch` will still output the
contents of `config/base_branch` (e.g. `stable` for 6.1), so it
evaluates to `true` and `TAILS_GIT_BASE_COMMIT` is written, which
breaks reproducibility if your origin/stable isn't in the same state
as for the RM/jenkins when they built the release, which is very
likely.

While we're at it we also drop TAILS_GIT_BASE_BRANCH since it's only a
concept that is relevant when working with branches, so it doesn't
make sense for releases.

Refs: tails/tails#20311
auto/config