Browse Source

git depth and ref shouldn't depend on debian/source/options file

tags/devuan/0.14.1+devuan6
Daniel Reurich 6 years ago
parent
commit
112607606b
1 changed files with 17 additions and 8 deletions
  1. +17
    -8
      scripts/generate-git-snapshot

+ 17
- 8
scripts/generate-git-snapshot View File

@@ -353,17 +353,26 @@ git_source_options() {
fi
local file
local value
local opt_depth
local opt_ref
file="debian/source/options"
if [ -f ${file} ]; then
value=$(git config --file ${file} --get git-depth 2>&- || true)
if [ -z "${value:-}" ]; then
DBP_EXTRA_OPTS="${DBP_EXTRA_OPTS:-} --source-option=--git-depth=$GIT_DEPTH"
fi
value=$(git config --file ${file} --get git-ref 2>&- || true)
if ![ -z "${value:-}" ]; then
DBP_EXTRA_OPTS="${DBP_EXTRA_OPTS:-} --source-option=--git-ref=${BRANCH}"
fi
opt_depth=$(git config --file ${file} --get git-depth 2>&- || true)
opt_ref=$(git config --file ${file} --get git-ref 2>&- || true)
fi
if [ -z "${opt_depth:-}" ]; then
echo "Setting git source depth to $GIT_DEPTH"
DBP_EXTRA_OPTS="${DBP_EXTRA_OPTS:-} --source-option=--git-depth=$GIT_DEPTH"
else
echo "Using source depth of $opt_depth as defined in debian/source/option"
fi
if ![ -z "${opt_ref:-}" ]; then
echo "Setting git source ref to $GIT_REF"
DBP_EXTRA_OPTS="${DBP_EXTRA_OPTS:-} --source-option=--git-ref=${BRANCH}"
else
echo "Settin git source ref to $opt_ref as defined in debian/source/option"
fi

}




Loading…
Cancel
Save