Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
Minor fixes (#134)
Browse files Browse the repository at this point in the history
In the future string representations of file targets will be changed. Filenames
of artifacts should be accessed explicitly. Also string representation of rule context objects will no longer be equal to the string representation of their labels.
  • Loading branch information
grouma authored Jul 25, 2017
1 parent 900ee6b commit db841a6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.4.9

* Don't gzip Dart archives.
* Explicitly use filename when filtering files.

## 0.4.8

* Add utilities for Dart archives.
Expand Down
2 changes: 1 addition & 1 deletion dart/build_rules/common/_archive.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def create_archive(ctx, srcs, label):
"export ARCHIVE_DIR=$(mktemp -d)",
"bash %s" % tmp_file.path,
"cd $ARCHIVE_DIR",
"tar -chzf temp_tar.tar *",
"tar -chf temp_tar.tar *",
"cd $WORKSPACE",
"cp $ARCHIVE_DIR/temp_tar.tar %s" % tar_file.path]),
progress_message="Creating Dart archive")
Expand Down
3 changes: 2 additions & 1 deletion dart/build_rules/common/path.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ def filter_files(filetypes, files):
filtered_files = []
for file_to_filter in files:
for filetype in filetypes:
if str(file_to_filter).endswith(filetype):
filename = file_to_filter if type(file_to_filter) == "string" else file_to_filter.basename
if filename.endswith(filetype):
filtered_files.append(file_to_filter)
break

Expand Down

0 comments on commit db841a6

Please sign in to comment.