Commit Graph

58 Commits

Author SHA1 Message Date
Greg Magolan 11aacaf5df
chore: enable go, shell, yaml formatters and bazel run //:format (#917) 2024-08-20 11:56:40 -07:00
Greg Magolan cccf5ac1b8
refactor: make root workspace bzlmod only (#915) 2024-08-20 14:20:51 -04:00
Greg Magolan a36dd1201a
chore: bazel run //:buildifier (#903) 2024-08-14 11:27:58 -07:00
Justin Pinkul 74ac451d8a
Adding a preserve time feature to copy_to_directory and copy_directory (#898) 2024-08-10 22:08:56 -07:00
Peter Lobsinger 3c121a9cd9
perf: use darwin's clonefile syscall (#893)
* perf: use darwin's clonefile syscall

This saves time and disk-space when copying files around on the same
device. File clones (aka reflinks) share backing disk blocks; they
differ from hardlinks in that inodes are not shared and the contents are
copy-on-write.

The Go standard library (as of v1.22) arranges to do a similar thing for file
copies on Linux (see: https://cs.opensource.google/go/go/+/refs/tags/go1.22.6:src/os/zero_copy_linux.go;l=53).
Unfortunately, Mac OS' more limited API is less amenable to that form of
transparent wrapping.

* Assign to named return params and use naked returns
2024-08-08 16:29:47 -07:00
Greg Magolan 7a8f00cd7f
fix: exclude files in copy_to_directory before checking their realpath (#857) 2024-05-28 11:04:25 -07:00
Greg Magolan f30debb505
refactor: pre-factors for fix in copy_to_directory (#858) 2024-05-28 09:42:06 -07:00
Alex Eagle 4ad02b7795
refactor(release): switch release integrity to be dynamic (#854)
* refactor(release): switch release integrity to be dynamic

This matches rules_py as documented by
https://blog.aspect.build/releasing-bazel-rulesets-rust

It has the benefit that developers no longer get yelled at to vendor some updated integrity hashes into bazel-lib every time they touch the Go sources.

* refactor: echo should produce trailing newline

* chore: bump action-gh-release to avoid Node 16 warning

* chore: update test that is sensitive to compilation mode

We now only use --compilation_mode=opt when cutting a release
2024-05-23 16:08:35 -07:00
Greg Magolan ffc5a7bfa1
chore: align ci patterns (#843) 2024-05-13 23:51:10 -07:00
Malte Poll 1697a3275b
fix: coreutils toolchain: Use statically linked linux amd64 variant (#706)
* coreutils toolchain: Use statically linked linux amd64 variant

Uutils has a musl release artifact for linux amd64.
In the future, it should probably also be possible to add a
aarch64 musl toolchain. At the moment, this is not an upstream release
artifact.

* coreutils toolchain: temporarily add back old darwin variant

On release 0.0.26 of uutils/coreutils, the darwin x86_64 binary is missing.
Also, any releases between 0.0.23 and 0.0.26 are missing binary artifacts.
Downgrade coreutils toolchain on darwin x86_64 for now.

https://github.com/uutils/coreutils/releases/tag/0.0.26
2024-05-08 07:06:12 -07:00
Jordan Rodgers d8d22cbf77
fix: only check for blank space between status entries in expand_template (#834)
* only check for blank space between status entries in expand_template

* chore: update tool integrity

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
2024-05-06 13:29:56 -07:00
Jordan Rodgers 8c96b0eeb3
support spaces in status (#820)
* support spaces in status

* chore: update integrity hashes of go binaries

---------

Co-authored-by: Alex Eagle <alex@aspect.dev>
2024-04-22 13:46:47 -07:00
Greg Magolan 00b2d2ceb7
chore: upgrade to Aspect Workflows 5.9.14 (#772) 2024-03-01 10:22:55 -08:00
Alex Eagle 1be6994ca6
Fix prerelease (#708)
* fix: use source toolchains for git archive prereleases

* Add comment about "g" prefix
2024-01-04 12:07:19 -08:00
Sahin Yort 33bc4443fd
fix: create windows launcher for bats (#704) 2023-12-21 14:27:21 -08:00
Greg Magolan cbc5c7b06c
chore: enable workflows delivery on demostration target (#693) 2023-12-13 17:26:35 -08:00
Greg Magolan 13aefd6538
fix: isolate rules_lint dev dependency usage into its own Bazel package (#687) 2023-12-11 07:34:26 -08:00
renovate[bot] 9c025527cd fix(deps): update golang.org/x/exp digest to f3f8817 2023-12-08 11:52:13 -08:00
Greg Magolan b1c342a96f
chore: bazel run //:format (#682) 2023-12-08 00:30:39 -08:00
Greg Magolan bb64a79dc3
chore: bring in aspect_rules_lint and add format task to Aspect Workflows (#681) 2023-12-07 23:34:24 -08:00
Derek Cormier c3a8cb0c72
fix: remove need for rules_go when depending on a bzl_library target (#663) (#664) 2023-11-16 14:26:40 -08:00
Derek Cormier 5bd6e5fdd4
fix(ci): fix bzlmod issues and enable on ci (#658) 2023-11-15 15:07:03 -08:00
Alex Eagle 59ea86d7c0
refactor: move 'git archive' configuration to .gitattributes (#641)
Makes it match bazelbuild/rules_proto#189
2023-11-01 09:00:27 -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 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 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
Sahin Yort ef364b54b4
refactor: consume tools from source if unstamped (#543) 2023-09-24 15:06:10 -07:00
Sahin Yort 719b8f33b0
refactor: add ability to test against tools from source (#532) 2023-09-21 15:12:46 -07:00
Sahin Yort 04e1c3c473
refactor: remove stamp information from tools (#537) 2023-09-21 14:55:57 -07:00
Douglas Parker 077e4b034b
feat: update `copy_to_directory` tool to accept the name of its workspace and automatically include files from it (#488)
Refs #359.

This allows `copy_to_directory` to be run in an external workspace and include files from that workspace automatically once the `copy_to_directory` rule is updated. The rule update needs to be separated from the tool update because the tool is pre-built and vendored rather than built at HEAD.
2023-09-21 11:34:57 -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 8703eb9479
fix(expand_template): correct output permissions (#516)
We used hexadecimal where we meant to use octal.
0x666 in binary is 11001100110 but 0666 is 110110110 (9 digits as
expected)
so this was producing an output like
---xr--r-- 1 108 114 206 Sep  6 20:55 bazel-out/k8-opt/bin/stamped_labels.txt
2023-09-06 16:20:27 -07:00
Ricky Stewart 2931a1018a feat: add freebsd support 2023-07-25 20:14:46 -07:00
Jason Bedard 47dd4ce9fd chore: run buildifier 2023-06-13 16:28:17 -07:00
Sahin Yort 6af964f261
feat: support stamp substituions (#435) 2023-05-16 16:14:50 -07:00
Sahin Yort 66da21ff6f
fix: remove missing toolchain load (#437) 2023-05-16 15:07:06 -07:00
Sahin Yort 3b4b59c4b4
feat: introduce expand_template toolchain (#436) 2023-05-16 14:56:57 -07:00
Sahin Yort e31867302e
chore: use coreutils hashsum (#333) 2023-03-10 20:37:57 +03: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
Jacob Gardner 76b0b3b90f
Fix Realpath relying on path.IsAbs which does not work on windows (#358) 2023-02-11 12:45:29 -08:00
Thulio Ferraz Assis 2854f86e56
fix: limit copy concurrency (#351)
Signed-off-by: Thulio Ferraz Assis <3149049+f0rmiga@users.noreply.github.com>
2023-02-01 12:30:42 -08:00
Greg Magolan de8d9cae3d
fix: use custom realpath function in copy_directory and copy_to_directory since github.com/yookoala/realpath has bugs on Windows (#338) 2023-01-16 21:46:50 -08:00
Greg Magolan 74caa5c097
fix: on Windows you must call filepath.Walkdir on the realpath and not the symlink path (#335) 2023-01-16 15:41:39 -08:00
Greg Magolan ce043b299d
fix: fix pathing issue in new copy_to_directory binary tool on Windows (#334) 2023-01-16 15:09:18 -08:00
Sahin Yort 4dc36a97f2
feat: add coreutils toolchain (#332) 2023-01-16 21:02:17 +03:00
Greg Magolan e84d97a161
refactor: parallize copy_to_directory binary tool using go routines (#329) 2023-01-15 12:41:00 -08:00
Greg Magolan 83671910f7
chore: cleanup copy tools golang code (#327) 2023-01-15 12:17:30 -08:00
Greg Magolan 01f5c3e949
chore: parallelize copies in copy_directory with go routines (#326) 2023-01-14 19:09:57 -08:00
Greg Magolan 7b6c814e27
Add copy_directory binary tool (#324) 2023-01-14 15:51:01 -08:00
Greg Magolan 8d21ed00d4
Add hardlink support to copy_to_directory binary tool (#322) 2023-01-14 07:55:23 -08:00