Browse Source

Merge branch 'master' into 'master'

fix handling of debian/source/options

* git-depth now overrides the default $GIT_DEPTH environment variable
* git-ref is added to the default ref-list

See merge request !103
tags/devuan/0.15.2+devuan4
Daniel Reurich 5 years ago
parent
commit
68d0c01c61
1 changed files with 10 additions and 12 deletions
  1. +10
    -12
      scripts/generate-git-snapshot

+ 10
- 12
scripts/generate-git-snapshot View File

@@ -377,7 +377,7 @@ git_source_options() {
#Unless otherwise specified in the debian/source/options
# restrict git source archive depth and limit to only the branch we build.
if [ -z "${GIT_DEPTH:-}" ]; then
GIT_DEPTH=20
GIT_DEPTH=50
fi
local file
local value
@@ -387,19 +387,17 @@ git_source_options() {
if [ -f ${file} ]; then
opt_depth=$(git config --file ${file} --get git-depth 2>&- || true)
opt_ref=$(git config --file ${file} --get git-ref 2>&- || true)
if [ -z "${opt_depth:-}" ]; then
echo "Using source depth of $opt_depth as defined in debian/source/options"
$GIT_DEPTH=${opt_depth}
fi
if [ -z "${opt_ref:-}" ]; then
echo "Adding git source ref: ${opt_ref}"
DBP_EXTRA_OPTS="${DBP_EXTRA_OPTS:-} --source-option=--git-ref=${opt_ref}"
fi
fi
if [ -z "${opt_depth:-}" ]; then
echo "Using source depth of $opt_depth as defined in debian/source/options"
$GIT_DEPTH=${opt_depth}
fi
echo "Setting git depth to $GIT_DEPTH"
"Setting git depth to $GIT_DEPTH"
DBP_EXTRA_OPTS="${DBP_EXTRA_OPTS:-} --source-option=--git-depth=$GIT_DEPTH"
if [ -z "${opt_ref:-}" ]; then
echo "Adding git source ref: ${opt_ref}"
DBP_EXTRA_OPTS="${DBP_EXTRA_OPTS:-} --source-option=--git-ref=${opt_ref}"
else
DBP_EXTRA_OPTS="${DBP_EXTRA_OPTS:-} --source-option=--git-ref=${BRANCH}"
fi
}




Loading…
Cancel
Save