Skip to content

Commit

Permalink
Include rules_haskell revision in platform suffix (digital-asset#6209)
Browse files Browse the repository at this point in the history
* Include rules_haskell revision in platform suffix

Hopefully this makes CI a bit less of a dumpsterfire. I’ve also
followed the comment and made the suffix actually 3 characters long
instead of 2 since that makes me worry less about collisions and
should hopefully still be short enough to not hit MAX_PATH.

changelog_begin
changelog_end

* Update ci/configure-bazel.sh

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>

Co-authored-by: Gary Verhaegen <gary.verhaegen@digitalasset.com>
  • Loading branch information
cocreature and garyverhaegen-da authored Jun 3, 2020
1 parent c2961b1 commit b993339
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ci/configure-bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ cd "$(dirname "$0")"/..

step "configuring bazel"

# We include the rules_haskell revision in the suffix since
# it sometimes breaks Windows due to the lack of sandboxing.
RULES_HASKELL_REV="$(sed -n 's/rules_haskell_version = "\(.*\)"$/\1/p' deps.bzl)"

if [ ! -z "${BAZEL_CONFIG_DIR:-}" ]; then
cd "$BAZEL_CONFIG_DIR"
fi
Expand All @@ -64,8 +68,8 @@ if is_windows; then
# To avoid exceeding the maximum path limit on Windows we limit the suffix to
# three characters.
echo "Working directory: $PWD"
SUFFIX="$(echo $PWD | md5sum)"
SUFFIX="${SUFFIX:0:2}"
SUFFIX="$(echo $PWD $RULES_HASKELL_REV | openssl dgst -md5 -binary | openssl enc -base64)"
SUFFIX="${SUFFIX:0:3}"
echo "Platform suffix: $SUFFIX"
echo "build --platform_suffix=-$SUFFIX" >> .bazelrc.local
fi
Expand Down

0 comments on commit b993339

Please sign in to comment.