diff --git a/CHANGELOG.md b/CHANGELOG.md index ebdcb10..5cd8020 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines. +## 0.55.0 (2024-02-22) + + +### Bug Fixes + +* Normalize bazel symlinks to a resolved path +* Pass the correct path for normalize-bazel-symlinks + ## 0.54.0 (2024-02-09) diff --git a/tools/cbuild b/tools/cbuild index 77dccf8..d9d0503 100755 --- a/tools/cbuild +++ b/tools/cbuild @@ -153,7 +153,7 @@ if [[ ${VERBOSE} -eq 1 ]]; then printf "mounting workspace into container: %s\n" "${WORKSPACE_MOUNT}" &>/dev/stderr fi -TOOLS_RELDIR="$(realpath "${TOOLS_DIR}" --relative-to="${WORKSPACE}")" +TOOLS_RELDIR="$(realpath "${TOOLS_DIR}" --relative-to="${PWD}")" readonly TOOLS_RELDIR if [[ -n ${CBUILD_IMAGE} ]]; then diff --git a/tools/normalize-bazel-symlinks b/tools/normalize-bazel-symlinks index af609d4..8506ac9 100755 --- a/tools/normalize-bazel-symlinks +++ b/tools/normalize-bazel-symlinks @@ -23,7 +23,7 @@ function normalize_symlink() { local -r link_path="$(readlink "${link_name}")" local -r output_user_root="${link_path///bazel_root/}" rm -f "${link_name}" - ln -s "${BAZEL_CACHE_DIR}/${output_user_root}" "${link_name}" + ln -s "$(realpath "${BAZEL_CACHE_DIR}/${output_user_root}")" "${link_name}" } function normalize_symlink_docker() { @@ -35,7 +35,7 @@ function normalize_symlink_docker() { local -r link_path="$(readlink "${link_name}")" local -r output_user_root="${link_path##*/.cache/bazel/}" rm -f "${link_name}" - ln -s "/bazel_root/${output_user_root}" "${link_name}" + ln -s "$(realpath "/bazel_root/${output_user_root}")" "${link_name}" } declare _normalize_fn=normalize_symlink @@ -50,5 +50,7 @@ declare -a -r LINK_DIRS=( bazel-workspace ) for link in "${LINK_DIRS[@]}"; do - ${_normalize_fn} "${link}" + if [[ -L ${link} ]]; then + ${_normalize_fn} "${link}" + fi done diff --git a/version.txt b/version.txt index 806cc5f..2b045fa 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -0.54.0 \ No newline at end of file +0.55.0 \ No newline at end of file