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

521 commits

Author SHA1 Message Date
Alex Eagle 339fd76bf0
chore: remove useless check for stamped binary (#618)
Since we stopped `--stamp`ing our releases, this check can never fail.
2023-10-10 20:32:11 -04:00
Greg Magolan 219240d27a
chore: upgrade to Aspect Workflows 5.8.0 (#617) 2023-10-10 16:14:15 -07:00
Alex Eagle eda4929c72
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
2023-10-10 14:13:17 -07:00
Alex Eagle 177b883991
refactor: use _mtree_line helper (#612)
Also restore the .bazeliskrc file I accidentally removed in 4bfe55711a
2023-10-10 12:33:21 -07:00
Derek Cormier 20f1ac39e0
refactor: rework toolchain registration for WORKSPACE and bzlmod users (#597) 2023-10-10 12:16:13 -07:00
Alex Eagle e1d9d9b58f 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:57:18 -07:00
Douglas Parker 323329f119 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 10:57:08 -07:00
Alex Eagle 472bf9b122
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
2023-10-09 15:57:52 -07:00
Alex Eagle 4bfe55711a
feat: expose a config_setting for copy execution_requirements (#606)
* 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 13:57:34 -07:00
Greg Magolan aa478e4c95 chore: upgrade to Aspect Workflows 5.8.0-rc14 (#598) 2023-10-09 11:15:38 -07:00
Greg Magolan b58426619d chore: upgrade to Aspect Workflows 5.8.0-rc12 (#596) 2023-10-09 11:15:33 -07:00
Alex Eagle 4a4dafa6e8
Fix bzlmod (#600)
* 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.
2023-10-08 15:57:29 -07:00
Alex Eagle 28cb7a2145
chore: fix tar_toolchain naming (#599)
Also register them in the correct order, matching how WORKSPACE works
2023-10-08 15:16:55 -07:00
Alex Eagle bc97305fcd 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 19:19:18 -07:00
Greg Magolan 1cd2eb7e0a
refactor: remove exclude_prefixes from copy_to_directory and copy_to_directory_bin_action (#591) 2023-10-06 10:17:33 -07:00
Greg Magolan cb9b74f41e
refactor: remove to_workspace_path and to_manifest_path (#590) 2023-10-06 08:37:53 -07:00
Greg Magolan 231dad5c92
refactor: remove output_dir from run_binary and expand_variables (#588) 2023-10-06 08:32:55 -07:00
Greg Magolan 3a16b4de26
refactor: remove legacy copy_directory_action helper (#589) 2023-10-06 08:32:25 -07:00
Alex Eagle 894ba445c4
chore: remove is_windows attributes (#587)
Fixes some TODOs for 2.0
2023-10-05 16:03:15 -07:00
Derek Cormier 99f36cc298 feat(presets): always fetch all coverage files on coverage runs (#564) 2023-10-05 15:57:37 -07:00
Derek Cormier dca2b1df0c
chore: remove legacy copy_to_directory_action (#582) 2023-10-05 15:52:37 -07:00
Alex Eagle e640c0db0f
chore: check gazelle on CI (#586) 2023-10-05 15:50:42 -07:00
Alex Eagle 6a4381bf07
chore: run gazelle (#584)
Also delete the local_config_platform workaround for bazel 5 which made our docs setup complex
2023-10-05 14:22:38 -07:00
Alex Eagle 3a757c8a95
chore: drop Bazel 5 support for 2.0 (#585) 2023-10-05 14:18:42 -07:00
Derek Cormier 078530c7a1
fix: fix bad import (#583) 2023-10-05 13:00:03 -07:00
David Zbarsky 8fe4f6f8d5
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>
2023-10-05 12:36:55 -07:00
Derek Cormier 20480444e6
chore: run CI on 2.x branch (#581) 2023-10-05 12:35:31 -07:00
Derek Cormier 46a16e500c
chore: remove expand_template re-export (#580) 2023-10-05 12:33:13 -07:00
Alex Eagle 652773d5fa
fix: register tar toolchain for bzlmod users (#574) 2023-10-04 10:43:09 -07:00
Alex Eagle a283a8216d 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>
2023-10-03 13:50:55 -07:00
Derek Cormier 174bb9425d feat: support jq 1.7 toolchain (#520) 2023-10-03 13:50:55 -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
Marc Redemske b29be5ff64
docs: add minimum pre-commit version (#544)
ensure developers have the right version to run all used hooks
2023-09-24 17:17:49 -07:00
Sahin Yort ef364b54b4
refactor: consume tools from source if unstamped (#543) 2023-09-24 15:06:10 -07:00
Greg Magolan b60dc04ed3
chore: upgrade to Aspect Workflows 5.8.0-rc8 (#546) 2023-09-23 09:52:00 -07:00