Commit Graph

125 Commits

Author SHA1 Message Date
Greg Magolan bcb10f8154
feat: add undeclared output mode to expand_template (#561) 2023-09-29 11:30:02 -07:00
Greg Magolan 1d816e011b
feat: add assert_directory_contains test to testing.bzl (#560) 2023-09-29 09:53:00 -07:00
Aaron Son a4e997de1f
feat: add `propagate_common_{,test_,binary_}rule_attributes` to lib/utils. (#553)
* feat: add `propagate_common_{,test_,binary_}rule_attributes` to lib/utils.

* lib/private/utils: PR feedback: extract COMMON_BINARY_RULE_ATTRIBUTES and COMMON_TEST_RULE_ATTRIBUTES to global constants.

* lib/private/utils: PR feedback: remove default value for attrs param to propagate_common_*rule_attributes

* fix: lib/private/utils: buildifier.
2023-09-26 14:29:42 -07:00
Marc Redemske 45986f000d
feat: add list utils (#512)
* feat: add list utils

* chore: add docs for lists

* fixes accoding to review

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
2023-09-21 10:12:47 -07:00
Alex Eagle 882bc95615
feat: expand_template allows inline template content (#533)
Co-authored-by: thesayyn <thesayyn@gmail.com>
2023-09-20 18:32:05 -07:00
Greg Magolan 76ef6c8988
chore: add test coverage for run_binary & expand_variables makevars (#504) 2023-08-26 13:59:48 -07:00
Steven E. Harris 3af9e00308
docs: clarify write_source_files output constraint (#498)
* docs: clarify write_source_files output constraint

For both the "write_source_files" rule's "files" attribute and the
"write_source_file" rule's "out_file" attribute, we ensure that the
destination files and directories to which we'll write sit within the
same containing Bazel package as the Bazel target requesting this
writing. Clarify the documentation for each attribute to make it clear
that we're constraining the destinations and not the sources of the
content to be written.

* Update lib/write_source_files.bzl

---------

Co-authored-by: Derek Cormier <derek@aspect.dev>
2023-08-23 12:32:56 -07:00
Alex Eagle c6e9fa0e62 chore: document JQ_BIN make var 2023-07-26 13:18:31 -07:00
Alex Eagle 5ecaeb5c53 chore: update docs 2023-07-18 11:01:26 -07:00
Malte Poll d79f4d4867 feat: yq supports stamping
Fixes #223
2023-06-15 16:50:26 -07:00
Jason Bedard 47dd4ce9fd chore: run buildifier 2023-06-13 16:28:17 -07:00
Alex Eagle c89ec6a554 docs: clarify rlocationpath 2023-05-24 17:16:00 -07:00
Sahin Yort 6af964f261
feat: support stamp substituions (#435) 2023-05-16 16:14:50 -07:00
Sahin Yort 781d1cbebf
feat: implement chr, ord, and hex (#425) 2023-05-15 12:15:55 -07:00
Alex Eagle 347cdac300 update docs 2023-05-08 07:49:24 -07:00
Alex Eagle 6f1f2fb198 fix(yq): restore default version, reverting #405
The new version of yq is quite breaking, as it requires '-oj -r' for continued operation in rules_oci.
We can do a default version flip later when more downstream projects are compatible.
2023-05-05 13:07:51 -07:00
Henk Erik van der Hoek 39d556a225
Chore: update YQ (#405)
* Chore: update YQ

* Update tests

* Update docs

* Update docs

---------

Co-authored-by: Greg Magolan <gmagolan@gmail.com>
2023-05-01 19:18:50 -07:00
Jason Bedard b983608c08
docs(write_source_file): specify the name of the generated diff_test (#410)
Fix #409
2023-04-19 14:09:03 -07:00
Alex Eagle a04c31248b docs(jq): document empty srcs 2023-04-19 09:03:52 -07:00
Alex Eagle 5162ae4d8c feat: detect bzlmod automatically rather than requiring the user sets the flag.
Thanks to @aherrmann for pointing out this is possible: https://github.com/aherrmann/demo-bazel-detect-bzlmod-config-setting
2023-03-31 14:56:22 -07:00
Gary Miguel e872660dbc
Update link to example from angular (#388)
* Update link to example from angular

Previous target was deleted or renamed. Now use a permalink.

* bazel run @//docs:update
2023-03-07 15:42:16 -08:00
Greg Magolan 8c58935da1
feat: add label_str utility to generate consistent label strings for all Bazel versions (#386) 2023-03-03 18:23:17 -08:00
Greg Magolan 1fdfd6e831
fix: add missing **kwargs to write_aspect_bazelrc_presets (#379) 2023-02-22 12:17:00 -08:00
Derek Cormier 83fb3050c2 feat: allow additional common args to be passed to update_docs 2023-02-21 10:49:06 -08:00
Greg Magolan 569fa374ef
feat: add write_aspect_bazelrc_presets macro (#370) 2023-02-17 14:34:06 -08:00
Alex Eagle 1df2becc7a chore: turn on more basic precommit checks
In particular this makes our bazelrc presets more compliant with client codebases, ensuring they can copy these files and not trip on their own pre-commit check
2023-02-17 11:00:00 -08:00
Alex Eagle bda8e69ea0 chore: fix spelling 2023-02-15 09:08:46 -08:00
Greg Magolan 8f02b3364e
feat: add to_rlocation_path and to_repository_relative_path functions to paths.bzl (#362) 2023-02-11 12:36:49 -08:00
Derek Cormier 096805f0ce enhancement: allow additional attributes to be passed to assert_* tests 2023-02-10 07:14:05 -08:00
Alex Eagle 2cb6c7ac4f chore: also accept expected as a list of entries 2023-01-20 16:16:42 -08:00
Alex Eagle 19dcea9828 refactor: infer the archive type from the filename 2023-01-20 16:16:42 -08:00
Alex Eagle 083ff26ced feat: add assert helper for zip contents
Helps to make sure that Python wheels are correctly constructed, as one example.
2023-01-20 16:16:42 -08:00
Greg Magolan 63f5aff803
feat: hardlink generated files in copy_to_directory and copy_directory instead of copying (#321) 2023-01-16 17:19:13 -08:00
Sahin Yort 4dc36a97f2
feat: add coreutils toolchain (#332) 2023-01-16 21:02:17 +03:00
Greg Magolan 1d3f04f7b9
chore: cleanup copy_to_directory docs and expose attr docstrings via lib for use downstream (#330) 2023-01-15 13:24:15 -08:00
Greg Magolan 7b6c814e27
Add copy_directory binary tool (#324) 2023-01-14 15:51:01 -08:00
Alex Eagle 14b8ec7a7b refactor: just point to jq doc 2023-01-09 11:31:15 -08:00
Derek Cormier 0df23e54db feat: modify assert_json_matches api before release 2023-01-09 11:31:15 -08:00
Alex Eagle fe867981ee feat(jq): add a diff_test helper
This is useful in rules_swc where we want to check that tsconfig.json and .swcrc have matching paths, and most users will want that too
2023-01-07 13:10:28 -08:00
Greg Magolan fb3ef6e45d
feat: improved copy_to_directory performance & globbing support using copy_to_directory_bin_action (#311) 2023-01-07 11:26:27 -08:00
Greg Magolan ec13ec9a69
feat: improve performance of copy_to_directory by moving glob match & copying to a golang binary (#308) 2023-01-03 09:42:20 -08:00
Greg Magolan 0d456be3c6
fix: formatting for new docsite (#302) 2022-12-28 08:03:18 -08:00
Derek Cormier 72a26212f2
Add platform_transition_binary rule (#289)
* feat: add platform_transition_binary rule
2022-12-14 11:21:08 -08:00
Greg Magolan 68aee64093
feat: add write_source_file to public API (#295) 2022-12-03 14:57:28 -08:00
Greg Magolan 421cf266bc
fix: add diff_test to docs (#296) 2022-12-03 11:32:37 -08:00
Greg Magolan 9059f8fa5e feat: add executable attribute to write_source_files 2022-12-03 10:46:08 -08:00
Greg Magolan 3d73637ee5
feat: add base64 encode & decode utility functions (#292) 2022-11-25 17:00:02 -08:00
Jason Bedard 350408b93d
perf: do not execute glob for non-glob copy_to_directory root_paths/replace_prefix params (#274)
* glob: add is_glob util method

* perf: do not execute glob for non-glob copy_to_directory root_paths/replace_prefix params

* perf: add common path matching shortcuts

* fix: disallow invalid empty glob expressions
2022-11-02 18:44:42 -07:00
Alex Eagle a9dc052c8b feat: add assert_outputs
It's a simple way to make an executable example demonstrate what outputs a rule produces.
See https://github.com/aspect-build/rules_ts/pull/214 for an example usage in the real world.
2022-10-31 15:25:12 -07:00
Greg Magolan f030847908
feat: add maybe_http_archive (#270) 2022-10-27 15:55:57 -07:00