2
0
Fork 0
mirror of https://github.com/bazel-contrib/bazel-lib synced 2024-11-27 17:43:27 +00:00
Commit graph

172 commits

Author SHA1 Message Date
Greg Magolan 58b2c59bb0
refactor: export copy_to_directory_lib in the public API for use downstream in packaging rules (#96) 2022-04-29 15:26:24 -07:00
Greg Magolan 9a9a1888e1
chore: normalize @generated by comments (#93) 2022-04-29 00:49:15 -07:00
Greg Magolan f1e10df09c
chore: replace is_windows select pattern with target_platform_has_constraint pattern (#95) 2022-04-29 00:36:51 -07:00
Greg Magolan 67e1072e25
chore: use aspect_bazel_lib diff_test (#94) 2022-04-29 00:36:41 -07:00
Greg Magolan ec587d974e
chore: rename all instances of repository_ctx to the preferred rctx (#92) 2022-04-29 00:36:25 -07:00
Derek Cormier 6743c0cbcf feat: make it easier to resolve jq/yq toolchains from a repository rule 2022-04-28 16:30:24 -07:00
Greg Magolan 41ce34470f
feat: add @aspect_bazel_lib_host repository and normalize function names in repo_utils (#90) 2022-04-28 14:18:06 -07:00
Alex Eagle 626af72fe8 test: add test coverage for docs rules 2022-04-27 17:34:45 -07:00
Alex Eagle 8138d7f6c3 test: introduce an e2e test asserting that bzlmod works 2022-04-27 17:34:45 -07:00
Greg Magolan 04c0f95136
feat: rename @yq_host and @jq_host to @yq and @jq respectively and export bin() function in index.bzl to get bin label for host platform (#87) 2022-04-27 08:08:28 -07:00
Greg Magolan c2d4481570
feat: add default yq and jq versions (#86) 2022-04-23 12:06:40 -07:00
Derek Cormier cf7b195031 fix: minor yq docs updates and fixes 2022-04-22 13:21:57 -07:00
Greg Magolan 048c32ae8d feat: add jq_host and yq_host repositories 2022-04-21 18:48:45 -07:00
Greg Magolan 207d219a88
feat: add os_arch_name() function to repo_utils and cleanup yq & jq toolchains for repository names follow this convention (#82) 2022-04-21 17:45:33 -07:00
Derek Cormier 3e4024c785
feat: yq (#80) 2022-04-19 21:45:06 -07:00
Derek Cormier e0af9633ed chore: fix buildifier errors 2022-04-15 15:44:40 -07:00
Greg Magolan d59ca6092f
fix: improve execution requirements of all copy files/directory rules for better perf (#79) 2022-04-14 10:48:44 -07:00
Greg Magolan 48b6f29367
fix: make tool of run_binary cfg=exec (#74) 2022-04-14 10:40:39 -07:00
Greg Magolan 0a9c48a712
feat: add create_windows_native_launcher_script to lib/windows_utils.bzl (#75) 2022-04-14 09:01:08 -07:00
Greg Magolan 35b430abcc
feat: add some additional make variable substitutions for common useful values in the context (#73) 2022-04-14 07:05:28 -07:00
Greg Magolan 03528db12b
chore: remove unused file (#77) 2022-04-14 07:02:20 -07:00
Greg Magolan b9bc7a4cea
fix: add copy_file_to_bin_action and copy_files_to_bin_actions to //lib:copy_to_bin.bzl (#72) 2022-04-13 13:55:41 -07:00
Greg Magolan 6828d92964
refactor: split copy_to_bin_action into copy_file_to_bin_action and copy_files_to_bin_actions (#71) 2022-04-13 13:01:17 -07:00
Greg Magolan 62bb04db30
feat: add copy_to_bin_action for use in other rules (#70) 2022-04-13 12:40:07 -07:00
Greg Magolan b2955dcb05
feat: add copy_to_bin rule (#69) 2022-04-12 16:31:04 -07:00
Greg Magolan 6e653ca787
feat: add copy_file_action helper function to the public API (#68) 2022-04-12 13:58:30 -07:00
Greg Magolan 2e213c2029
feat: add copy_directory_action help to the public API (#67) 2022-04-12 03:34:51 -07:00
Greg Magolan 322bbc92df feat: add repo_utils with fork of @bazel_tools patch function that takes a working_directory argument 2022-04-11 18:15:32 -07:00
Greg Magolan 1421a1d6f4 chore: add upstream @bazel_tools patch utility function prior to forking 2022-04-11 18:15:32 -07:00
Jason Bedard 0f30bf96b7
fix(write_source_files): fix nested directories (#65) 2022-04-06 11:25:17 -07:00
Derek Cormier 35b8fd3425
refactor: remove directory functionality from copy_file (#64) 2022-04-05 13:38:54 -07:00
Derek Cormier a23d1b03f7
feat: add copy_directory (#63) 2022-04-03 17:52:03 -07:00
Derek Cormier 9ef738909b fix: incorrect variable name 2022-04-01 10:52:09 -07:00
Derek Cormier ccea32c670 fix: fix invalid format string 2022-04-01 10:52:09 -07:00
Greg Magolan e679a26b42
fix: use -R instead of -r in cp calls so macos & linxu behavior is the same (#58) 2022-04-01 00:57:34 -07:00
Greg Magolan e30e89fa3d
feat: add run_binary with output directory support & improved makevar expansion (#57) 2022-03-31 20:04:35 -07:00
Alex Eagle 096133e5d2
feat: platform_transition_filegroup (#55)
* feat: platform_transition_filegroup

Lifted from https://github.com/aspect-build/gcc-toolchain/pull/8/files
See also https://github.com/fmeum/rules_meta/blob/main/meta/internal/meta.bzl#L4

* test: add tests for transition filegroup
2022-03-30 21:04:14 -07:00
Jason Bedard a2e228dde0
fix(write_source_files): fix writing to workspace root (#53) 2022-03-30 17:04:35 -07:00
Greg Magolan 3599515632
fix: ensure out_file does not show up in source file query of write_source_file so that it can be used with ibazel (#52) 2022-03-28 14:53:58 -07:00
Greg Magolan bda5c632be
feat: replace default_info_files with output_files which adds output_group attribute (#50) 2022-03-15 17:36:22 -07:00
Greg Magolan 3b93ee0baa
Add DefaultOutputPathInfo provider and update write_source_files to accept it (#48)
Also update write_source_files to accept DirectoryPathInfo
2022-03-14 17:33:52 -07:00
Derek Cormier 7f2641cd07 reimplement stardoc_with_diff_test to use write_source_files 2022-03-11 09:50:55 -08:00
Greg Magolan 0fd56dc59d
feat: add directory_path rule and DirectoryPathInfo for specifying files within tree artifacts (#42) 2022-03-03 16:40:32 -08:00
Derek Cormier f788d286d0
feat: write to source folders (#41) 2022-03-02 12:58:36 -08:00
Derek Cormier ca764e53e8
feat: write_source_files bulk write for windows (#43) 2022-03-02 12:56:50 -08:00
Derek Cormier 71c1b893d6
feat: bulk updates for write_source_files (#40) 2022-02-28 15:42:20 -08:00
Derek Cormier 2195e1c69a feat: write_source_files windows implementation 2022-02-24 16:45:31 -08:00
Derek Cormier ca4a9f8c23
fix: fix buildifier 5.0.0 errors (#35) 2022-02-11 07:52:01 -08:00
Derek Cormier 8e6a15ceae feat: write_source_files 2022-02-07 10:00:35 -08:00
Derek Cormier 8a287def7c fix: improve jq usage docs 2022-02-07 09:45:02 -08:00
Greg Magolan 40e25c0b37
fix: use robocopy in copy_file#is_directory and copy_to_directory (#26)
so we don't hit the file path length limit of xcopy
2022-01-27 04:57:52 -08:00
Matt Mackay 1b28271ebc
[utils] propagate CPU tags (#24) 2022-01-18 16:24:44 -05:00
Greg Magolan 8f27b63480 feat: add forked diff_test that handles comparing directories 2021-12-21 16:12:05 -08:00
Greg Magolan 3bce8db100 fix: add windows implementation of copy_to_directory 2021-12-21 16:12:05 -08:00
Derek Cormier e371656bc3 feat: load jq filter from file 2021-12-20 13:21:26 -08:00
Alex Eagle 885fcb3f6e
fix: expose bare jq/jq.exe binary (#20) 2021-12-18 11:13:24 -08:00
Alex Eagle 87cecb51a2
fix: allow tags/visibility on jq rule (#19)
fixes #18
2021-12-17 16:55:00 -08:00
Greg Magolan 8dc3d2e52a feat: add include_external_repositories and exclude_prefixes attributes to copy_to_directory
Also change the default behavior such that files from external repositories are not included unless the external repository is listed in include_external_repositories
2021-12-16 17:37:54 -08:00
Derek Cormier c0121bdb32
docs: add jq usage examples (#16)
* docs: add jq usage examples

* (squash) use backticks for usage examples
2021-12-15 16:02:28 -08:00
Derek Cormier b8347b5f0a feat: add jq toolchain and rule 2021-12-14 17:59:52 -08:00
Alex Eagle aca19c4ac7
fix: release archive needs a strip_prefix (#14)
Also remove some dead code
2021-12-11 12:43:57 -08:00
Alex Eagle 48b0a774ea
fix: copy_to_directory exposes output in runfiles (#10) 2021-12-01 17:09:48 -08:00
Greg Magolan 0d2981f288 feat: copy_to_directory copies files and directories to an output directory 2021-11-16 21:30:32 -08:00
Alex Eagle 2dfacb4d88
feat: expand_template does execpath and vars substitutions (#6) 2021-11-11 05:54:42 -08:00
Alex Eagle 3037b9615a
fix: also correct the workspace in another case of to_label (#5) 2021-11-10 10:38:54 -08:00
Alex Eagle 2b43162a76
fix: construct labels relative to calling workspace (#4) 2021-11-10 09:11:32 -08:00
Alex Eagle f6b016bdb9 chore: run gazelle to add missing bzl_library 2021-11-10 06:43:01 -08:00
Chaitanya Varier 6f7469dd03
feat: add doc helpers (#2)
* add stardoc helpers

* fix incorrect default template in stardoc_with_diff_test()

* add stardoc helpers

* fix failing build for docs.md; add templates; cleanup
2021-11-10 06:34:00 -08:00
Alex Eagle da6fb88da7
feat: add runfiles helpers needed for rules_js (#3)
* feat: add runfiles helpers needed for rules_js

* chore: code review feedback
2021-11-10 06:30:07 -08:00
Alex Eagle cb8c2bad22
feat: add some paths and utils (#1)
* feat: add some paths and utils

* test: exercise relative to_label

* chore: cleanup naming and rctx helper
2021-11-09 15:13:30 -08:00
Alex Eagle 03eaca91f1 Add unittest 2021-11-08 07:22:47 -08:00
Alex Eagle bf35529fc9 Initial commit 2021-11-08 06:46:16 -08:00