Skip to content

Commit

Permalink
Prefix workspace name while referencing json (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
borkaehw authored and jin committed Aug 1, 2019
1 parent 35c53d7 commit 5b9866d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion private/pin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

set -euo pipefail
readonly maven_install_json_loc=$BUILD_WORKSPACE_DIRECTORY/{repository_name}_install.json
readonly execution_root=$(bazel info execution_root)
readonly workspace_name=$(basename $execution_root)
cat <<"RULES_JVM_EXTERNAL_EOF" | python -m json.tool > $maven_install_json_loc
{dependency_tree_json}
RULES_JVM_EXTERNAL_EOF
Expand All @@ -19,7 +21,7 @@ cat <<EOF
maven_install(
artifacts = # ...,
repositories = # ...,
maven_install_json = "//:{repository_name}_install.json",
maven_install_json = "@$workspace_name//:{repository_name}_install.json",
)
load("@{repository_name}//:defs.bzl", "pinned_maven_install")
Expand Down

0 comments on commit 5b9866d

Please sign in to comment.