proud-policeman-38871
11/07/2024, 1:08 PMsrc/
and libs/
that have changed since a git point in time (e.g. when using pants --changed-since=origin/main
)?
With nx
we would do yarn nx affected --target build --base=${{ needs.set-nx-base.outputs.NX_BASE }}
gorgeous-winter-99296
11/07/2024, 1:17 PMproud-policeman-38871
11/07/2024, 1:19 PMproud-policeman-38871
11/07/2024, 1:20 PMsrc/foo
and src/bar
in a PR, but don't touch src/baz
, I want to get src/foo
, src/bar
returnedproud-policeman-38871
11/07/2024, 1:22 PMsrc/foo
or a source file under src/bar
gorgeous-winter-99296
11/07/2024, 1:23 PM--changed-since
, just to be clear. For the filtering by address you probably want --filter-address-regex
, and for type you want --filter-target-type
. I'm not sure 100% how these interact with changed-since and transitive dependencies.proud-policeman-38871
11/07/2024, 1:26 PMpants --changed-since=origin/main list
shows all files changed - I guess I could just pipe that to a script to get the impacted projects or libs
pants --changed-since=origin/main --changed-dependents=transitive list
also returnselegant-florist-94385
11/07/2024, 2:19 PMpants --changed-since=origin/main --changed-dependents=transitive --filter-target-type=docker_image
to find all docker images that have been changedproud-policeman-38871
11/07/2024, 2:23 PMgorgeous-winter-99296
11/07/2024, 2:24 PMproud-policeman-38871
11/07/2024, 2:29 PMproud-policeman-38871
11/07/2024, 2:30 PMsrc
with changed files) came from pants --changed-since=origin/main --changed-dependents=transitive list | grep "^src" | grep -v ":" | cut -f 2 -d '/' | sort | uniq | tr '\n' ',' | tr -d '[:space:]'
but I'm sure using the filter target type will get me there quickergorgeous-winter-99296
11/07/2024, 2:34 PMinfo = pants(
f"--changed-since={args.treeish}",
"--changed-dependees=transitive",
"--filter-target-type=oci_python_image,oci_image_build",
"list",
pants_args=args.pants,
)
elegant-florist-94385
11/07/2024, 2:40 PM[cli.alias]
--changed-docker = "--changed-since=origin/main --changed-dependents=transitive --filter-target-type=docker_image"
and then use pants --changed-docker package publish
to build and publish all docker images that have changedproud-policeman-38871
11/07/2024, 2:41 PMelegant-florist-94385
11/07/2024, 3:02 PMcurved-television-6568
11/07/2024, 3:06 PMpackage
step in the example above is redundant.. as publish
will call package
behind the scenes)