2
0
Fork 0
mirror of https://github.com/bazel-contrib/bazel-lib synced 2024-11-26 13:30:30 +00:00
Commit graph

524 commits

Author SHA1 Message Date
Sahin Yort d9368f04ff
feat: expose common tar variables (#679) 2024-03-23 02:12:17 -04:00
Sahin Yort 6a543815f1
fix: expose tar_lib as public (#680) 2024-03-23 02:11:54 -04:00
Alex Eagle a98bf91ae9
feat: support treeartifacts (#630) (#631)
Co-authored-by: Sahin Yort <thesayyn@gmail.com>
2024-03-23 02:11:26 -04:00
Alex Eagle b1db281b81
chore: add windows binaries (#610)
* chore: add windows binaries

* chore: fix/exclude windows brokenness

* chore: try to see why diff tests fail on windows

* fix: rm bazelisk rc again for windows

* fix: try our own diff_test

* chore: use only our own diff_test
2024-03-23 02:09:57 -04:00
Alex Eagle 90f3a0731f
refactor: use _mtree_line helper (#612)
Also restore the .bazeliskrc file I accidentally removed in 4bfe55711a
2024-03-23 01:49:49 -04:00
Alex Eagle 0d901be0f5
feat: tar includes runfiles (#595)
* feat: tar includes runfiles

* chore: try to fix red circleci

* fix: tracked down problem

* chore: document tar#srcs supports runfiles

* chore: add comment about logic for trimming manifest suffix

* chore: missed a replacement spot

* chore: give up on the listing test for now
2024-03-23 01:49:03 -04:00
David Zbarsky 66a52c34f7
Avoid expanding mtree spec during analysis phase (#576)
* Avoid expanding mtree spec during analysis phase

* Update tar.bzl

remove comment and unused code

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
2024-03-23 01:46:44 -04:00
Alex Eagle a393109223
feat: add a tar toolchain (#468)
* feat: add a BSD tar toolchain

@thesayyn discovered that it has a feature which should make it a drop-in replacement for pkg_tar
including fine-grained file permissions and symlinks:
https://man.freebsd.org/cgi/man.cgi?mtree(8)

* show example of mtree usage

* feat: introduce tar rule

* cleanup and get test passing

* more cleanup

* chore: add support for compress flags

* chore: add docs

* chore: add docs

* feat: implement linux bsdtar toolchain (#566)

* chore: improve target naming

* WIP: args

* feat: generate mtree spec

Also allow arbitrary args

* refactor: mtree is required

* refactor: style nits

* fix: support mix of source and generated artifacts

* feat: demonstrate strip_prefix

* chore: regen docs

* fix: make host toolchain a fallback toolchain

* fix: include libarchive13.so when installing BSD tar

* chore: buildifier

* fix: aarch64 cpu constraint

* fix(ci): include libarchive13.so when running tar

* chore: add libnettle

* refactor: inputs mutated less

* refactor: remove unneeded substitution arg

* refactor: don't advertise unsupported modes

* fix: hack enough to make it run on my machine

* chore: dynamic libraries included in sh_binary under toolchain

* make sh_binary work

* refactor: drop arm64 for now

* fix toolchain

* fix test

* chore: improve test naming scheme

---------

Co-authored-by: Sahin Yort <thesayyn@gmail.com>
2024-03-23 01:42:58 -04:00
Alex Eagle c215c623f4 chore: make it possible to override run_binary#use_default_shell_env (#762)
Still not documented as public API. We think this leads to non-hermeticity and could cause cache misses, so it must be used with care.

Part of https://github.com/aspect-build/rules_js/issues/1303
2024-03-05 10:26:40 -08:00
Greg Magolan 4db4fb1192 chore: add bazel versions to BCR presubmit.yaml 2024-02-05 19:44:05 -08:00
Greg Magolan 27e3b10472 fix: merge user tags in stardoc_with_diff_test (#746) 2024-02-05 17:51:30 -08:00
Greg Magolan fca58db388 refactor: remove --enable-runfiles from javascript recommended bazelrc settings (#715) 2024-01-08 02:32:34 -08:00
Greg Magolan bf7131ffe7 feat: add is_bazel_7_or_greater utility (#714) 2024-01-08 02:32:28 -08:00
Greg Magolan 61f83128a0 chore: test against bazel 7.0.0 (#713) 2024-01-08 02:31:24 -08:00
Greg Magolan 3e62405a5e fix: move flags that should only be set with bazel 6 to bazel6.bazelrc recommended settings (#711) 2024-01-05 15:50:10 -08:00
Derek Cormier f37958951d
feat: give version.bzl public visibility (#670) 2023-11-22 11:11:31 -08:00
Derek Cormier ffc2807ec8
fix: remove need for rules_go when depending on a bzl_library target (#663) 2023-11-16 13:14:55 -08:00
Derek Cormier 78ed16ae46
feat: backport 2.x features for interoperability (#657) 2023-11-16 11:25:34 -07:00
Derek Cormier 7dbb96e225
fix(ci): fix bzlmod issues and enable on ci (#658) (#659) 2023-11-15 15:55:52 -08:00
Derek Cormier d2d303a2f8
Fix bzlmod (#600) (#660)
* fix: gazelle is not a devdep

It's easy to see because we reference the symbol two lines below here

* fix: gazelle must be a regular dep

I found this mistake when trying to use bazel-lib in a downstream repo.

Co-authored-by: Alex Eagle <alex@aspect.dev>
2023-11-15 15:35:55 -08:00
Greg Magolan b396514bd5 chore: don't run gazelle checks on 1.x branch 2023-10-31 23:34:46 +01:00
Greg Magolan ceaa936fba chore: run GitHub Actions CI on 1.x branch 2023-10-31 23:26:24 +01:00
Greg Magolan 6b0927d5b8 fix: fix execution requirements for 'build without the bytes' (#639) 2023-10-31 23:23:55 +01:00
Greg Magolan 5c1aea58b8 chore: upgrade to Aspect Workflows 5.8.3 (#635) 2023-10-31 23:23:00 +01:00
Greg Magolan 90f78476f8 chore: upgrade to Aspect Workflows 5.8.2 (#628) 2023-10-31 23:21:57 +01:00
Greg Magolan 9ed663e7cb chore: upgrade to Aspect Workflows 5.8.0 (#617) 2023-10-31 23:21:19 +01:00
Alex Eagle 5172e9b5eb chore: check gazelle on CI (#586) 2023-10-31 23:20:36 +01:00
Alex Eagle f489b3c67b
fix: windows home directory (#608)
HOMEPATH isn't always set. For example https://buildkite.com/bazel/bazel-bazel-examples/builds/2163#018b1a9d-0127-461f-8200-e89894397f35
USERPROFILE seems more widely documented as being the equivalent of HOME
2023-10-10 10:42:32 -07:00
Douglas Parker c6b39ab8f6
fix: always include files from the same workspace as the build target in copy_to_directory() (#360)
* fix: always include files from the same workspace as the build target in `copy_to_directory`

Fixes #359.

This updates the `copy_to_directory` tool to accept a workspace name representing the workspace of the target it is executing under. Any files in this workspace are automatically included, regardless of the `include_external_repositories` option. This makes it support usage within an external target (such as `@wksp//:dir`).

* test: add e2e test which uses `copy_to_directory` within an external workspace

Refs #359.

This should catch regressions where no files are copied when built within an external workspace and not using `include_external_repositories`.

* ci: fix stray workspace refs

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
2023-10-10 07:16:13 -07:00
Alex Eagle 8b06f31c46
feat: expose a config_setting for copy execution_requirements (#606) (#607)
* feat: expose a config_setting for copy execution_requirements

Fixes #604

* chore: add user docs

* chore: improve docs

* chore: better link to copy_file
2023-10-09 14:08:17 -07:00
Greg Magolan f4d6fd6ad9
chore: upgrade to Aspect Workflows 5.8.0-rc14 (#598) 2023-10-08 14:13:14 -07:00
Greg Magolan 088992e022
chore: upgrade to Aspect Workflows 5.8.0-rc12 (#596) 2023-10-07 11:11:23 -07:00
Alex Eagle cc862ffcd4
Revert "refactor: reduce execution requirements for copy" (#594)
* Revert "refactor: reduce execution requirements for copy"

This reverts commit 40c2ddc71a.

* Update ci.bazelrc
2023-10-06 15:20:40 -07:00
Derek Cormier 3ec1c6373f
feat(presets): always fetch all coverage files on coverage runs (#564) 2023-10-04 16:47:33 -07:00
Greg Magolan 7f951a7a0c
chore: bump to latest version of Aspect Workflows starter image (#571) 2023-10-03 10:21:01 -07:00
renovate[bot] e8c60a740d
chore(deps): update dependency buildifier_prebuilt to v6.3.3 (#489)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-29 14:53:05 -07:00
Alex Eagle e00ea2b977
chore: update pre-commit buildifier (#563)
It needs to match the one CI runs in
https://github.com/aspect-build/bazel-lib/actions/runs/6357283303/job/17268197322
2023-09-29 14:42:33 -07:00
Alex Eagle 063e88cde3
fix(ci): don't run patch on windows (#562) 2023-09-29 14:21:49 -07:00
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
Greg Magolan e8bbdbfda6
chore: update to Aspect CLI 5.7.2 (#559) 2023-09-28 18:48:03 -07:00
Greg Magolan 5ebb6906dc
chore: upgrade to Aspect Workflows 5.8.0-rc11 (#558) 2023-09-28 18:13:55 -07:00
Greg Magolan c8b36d08d0
chore: upgrade to Aspect Workflows 5.8.0-rc9 (#557) 2023-09-27 17:19:33 -07:00
Alex Eagle bc54655e71
ci: add assertion that bcr patches apply (#556) 2023-09-27 10:26:38 -07:00
Alex Eagle 9174085429
fix(ci): always build with -c opt (#555)
We no longer stamp our version anywhere since the Go tools must have deterministic hashes, so remove the --stamp setup
2023-09-27 09:56:35 -07:00
Alex Eagle 14d6c50fc5
chore: rules_go is a non-dev dep at HEAD (#554)
This ensures if you get a SHA of bazel-lib you build the tools/ from head
2023-09-27 09:01:51 -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
Greg Magolan 32488f02ce
chore: bump GKE machine type to e2-standard-2 (#551) 2023-09-26 09:36:37 -07:00
Sahin Yort 5ca9c8ff25
fix: macos sed (#550) 2023-09-25 13:13:49 -07:00
Greg Magolan 7908e53f43
chore: set --remote_download_minimal and --nobuild_runfile_links for all Workflows tasks (#549) 2023-09-25 09:36:18 -07:00