Unverified Commit de2318f3 authored by intrigeri's avatar intrigeri
Browse files

Merge branch 'stable' into testing

parents b6a721c0 40068ac4
......@@ -46,6 +46,7 @@ EXPORTED_VARIABLES = [
'GIT_COMMIT',
'GIT_REF',
'BASE_BRANCH_GIT_COMMIT',
'FEATURE_BRANCH_GIT_COMMIT',
].freeze
ENV['EXPORTED_VARIABLES'] = EXPORTED_VARIABLES.join(' ')
......@@ -439,6 +440,7 @@ task merge_base_branch: ['parse_build_options', 'setup_environment'] do
# state in order to avoid subtle build errors due to mixed state.
next if commit_before_merge == git_helper('git_current_commit')
ENV['GIT_COMMIT'] = git_helper('git_current_commit')
ENV['FEATURE_BRANCH_GIT_COMMIT'] = commit_before_merge
ENV['TAILS_BUILD_OPTIONS'] = (ENV['TAILS_BUILD_OPTIONS'] || '') + \
' nomergebasebranch'
Kernel.exec('rake', *ARGV)
......
......@@ -25,7 +25,11 @@ fi
GIT_BRANCH="$(git_current_branch)"
if [ -n "${GIT_BRANCH}" ]; then
CLEAN_GIT_BRANCH=$(echo "$GIT_BRANCH" | sed 's,/,_,g')
GIT_SHORT_ID="$(git_current_commit --short)"
if [ -n "${FEATURE_BRANCH_GIT_COMMIT:-}" ]; then
GIT_SHORT_ID="$(git rev-parse --short ${FEATURE_BRANCH_GIT_COMMIT})"
else
GIT_SHORT_ID="$(git_current_commit --short)"
fi
BASE_BRANCH_PART=''
if [ "${GIT_BRANCH}" != "$(base_branch)" ]; then
CLEAN_GIT_BASE_BRANCH=$(base_branch | sed 's,/,_,g')
......
......@@ -27,6 +27,7 @@ as_root_do() {
${GIT_COMMIT:+GIT_COMMIT="${GIT_COMMIT}"} \
${GIT_REF:+GIT_REF="${GIT_REF}"} \
${BASE_BRANCH_GIT_COMMIT:+BASE_BRANCH_GIT_COMMIT="${BASE_BRANCH_GIT_COMMIT}"} \
${FEATURE_BRANCH_GIT_COMMIT:+FEATURE_BRANCH_GIT_COMMIT="${FEATURE_BRANCH_GIT_COMMIT}"} \
"${@}"
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment