-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rb_binary: include only wrapper script in default outputs
without this, it is not possible to reliably locate (via runfiles library or make variables) the executable output of a rb_binary target from another target using it as a data dependency, e.g. a shell script. adds an example of such a case to the 'gem' example workspace. additionally try to avoid converting depsets to lists when possible
- Loading branch information
Showing
5 changed files
with
66 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
desc "say goodnight to bash" | ||
task "goodnight" do | ||
puts "exit 0" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
@@rlocation_lib@@ | ||
|
||
set -euo pipefail | ||
|
||
rake_binary_expansion=(@@rake_binary@@) | ||
|
||
echo "calling the rake binary" | ||
rake="$(rlocation @@rake_binary@@)" | ||
rakefile="$(rlocation @@rakefile@@)" | ||
"$rake" -f "$rakefile" goodnight | ||
set -x | ||
eval "$("$rake" -f "$rakefile" goodnight)" | ||
set +x | ||
|
||
echo "rake failed to fail" | ||
echo "rlocationpaths for rake binary:" | ||
printf ' %s\n' "${rake_binary_expansion[@]}" | ||
exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters