generate_source_tarball.sh: Avoid empty DEPTH reference while still appeasing shellcheck

- generate_source_tarball.sh: Avoid empty DEPTH reference while still appeasing shellcheck
- Related: RHEL-46635
This commit is contained in:
Andrew Hughes 2024-04-13 01:09:45 +01:00 committed by Thomas Fitzsimmons
parent 7e5f10bb84
commit da243c64dc
2 changed files with 3 additions and 1 deletions

View File

@ -2508,6 +2508,7 @@ cjc.mainProgram(args)
- openjdk_news.sh: shellcheck: Remove deprecated egrep usage (SC2196)
- generate_source_tarball.sh: Output values of new options WITH_TEMP and OPENJDK_LATEST
- generate_source_tarball.sh: Double-quote DEPTH reference (SC2086)
- generate_source_tarball.sh: Avoid empty DEPTH reference while still appeasing shellcheck
* Mon Jul 8 2024 Thomas Fitzsimmons <fitzsim@redhat.com> - 1:17.0.12.0.6-0.1.ea
- Update to jdk-17.0.12+6 (EA)

View File

@ -221,11 +221,12 @@ else
echo "Cloning ${VERSION} root repository from ${REPO_ROOT}"
if realpath -q "${REPO_ROOT}"; then
echo "Local path detected; not adding depth argument";
DEPTH="--";
else
DEPTH="--depth=1";
echo "Remote repository detected; adding ${DEPTH}";
fi
git clone "${DEPTH}" -b "${VERSION}" "${REPO_ROOT}" "${VERSION}"
git clone -b "${VERSION}" "${DEPTH}" "${REPO_ROOT}" "${VERSION}"
pushd "${VERSION}"
TAR_TIME="$(git log --max-count 1 --format=%cI)"
popd