Skip to content

Commit

Permalink
build: fix get_sources()
Browse files Browse the repository at this point in the history
  • Loading branch information
bastimeyer committed Jan 1, 2025
1 parent 8cc537a commit d6ac0c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion build-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -102,12 +102,13 @@ get_sources() {
mkdir -p "${DIR_REPO}"
pushd "${DIR_REPO}"

# TODO: re-investigate and optimize this
git clone --depth 1 "${gitrepo}" .
git fetch origin --depth "${GIT_FETCHDEPTH}" "${gitref}"
git -c advice.detachedHead=false checkout --force "${gitref}"
git ls-remote --tags --sort=version:refname 2>&- \
| awk "END{printf \"+%s:%s\\n\",\$2,\$2}" \
| git fetch origin --depth="${GIT_FETCHDEPTH}"
git -c advice.detachedHead=false checkout --force "${gitref}"
git fetch origin --depth="${GIT_FETCHDEPTH}" --update-shallow

log "Commit information"
Expand Down
3 changes: 2 additions & 1 deletion build-portable.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,13 @@ get_sources() {
mkdir -p "${DIR_REPO}"
pushd "${DIR_REPO}"

# TODO: re-investigate and optimize this
git clone --depth 1 "${gitrepo}" .
git fetch origin --depth "${GIT_FETCHDEPTH}" "${gitref}"
git -c advice.detachedHead=false checkout --force "${gitref}"
git ls-remote --tags --sort=version:refname 2>&- \
| awk "END{printf \"+%s:%s\\n\",\$2,\$2}" \
| git fetch origin --depth="${GIT_FETCHDEPTH}"
git -c advice.detachedHead=false checkout --force "${gitref}"
git fetch origin --depth="${GIT_FETCHDEPTH}" --update-shallow

log "Commit information"
Expand Down

0 comments on commit d6ac0c0

Please sign in to comment.