diff --git a/.bazelrc b/.bazelrc index 8d1afdf..566520a 100644 --- a/.bazelrc +++ b/.bazelrc @@ -9,3 +9,11 @@ common:ci --nobuild_runfile_links # Override the preset's `--lockfile_mode=error` on CI since we don't # yet commit MODULE.bazel.lock — see .gitignore. common:ci --lockfile_mode=off + +# Bazel doesn't create runfiles trees on Windows by default, breaking tests +# that resolve data files by relative path (e.g. bazel-lib's assert_contains). +# The preset enables --enable_platform_specific_config, so config=windows is +# applied automatically on Windows hosts. --windows_enable_symlinks is a no-op +# elsewhere. +startup --windows_enable_symlinks +common:windows --enable_runfiles diff --git a/.github/workflows/release_prep.sh b/.github/workflows/release_prep.sh index f50170e..3b559c3 100755 --- a/.github/workflows/release_prep.sh +++ b/.github/workflows/release_prep.sh @@ -8,18 +8,19 @@ TAG=$1 # The prefix is chosen to match what GitHub generates for source archives PREFIX="rules_terser-${TAG:1}" ARCHIVE="rules_terser-$TAG.tar.gz" -git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip > $ARCHIVE +git archive --format=tar --prefix=${PREFIX}/ ${TAG} | gzip >$ARCHIVE SHA=$(shasum -a 256 $ARCHIVE | awk '{print $1}') # Add generated API docs to the release, see https://github.com/bazelbuild/bazel-central-registry/issues/5593 -docs="$(mktemp -d)"; targets="$(mktemp)" +docs="$(mktemp -d)" +targets="$(mktemp)" bazel --output_base="$docs" query --output=label --output_file="$targets" 'kind("starlark_doc_extract rule", //...)' bazel --output_base="$docs" build --target_pattern_file="$targets" --remote_download_regex='.*doc_extract\.binaryproto' tar --create --auto-compress \ - --directory "$(bazel --output_base="$docs" info bazel-bin)" \ - --file "$GITHUB_WORKSPACE/${ARCHIVE%.tar.gz}.docs.tar.gz" . + --directory "$(bazel --output_base="$docs" info bazel-bin)" \ + --file "$GITHUB_WORKSPACE/${ARCHIVE%.tar.gz}.docs.tar.gz" . -cat << EOF +cat <