creamy-activity-5659
08/10/2018, 2:59 PM./pants bundle setup-py docker-publish --setup-py-run="bdist_wheel" --changed-parent=HEAD~1
I believe the bundle goals is implied by the latter, but it works. The trick I needed was adding the --changed-parent=HEAD~1
flag to build only those targets that changed since the last commit.
Before I run the command above, I run printf "Targets: %s\n" "$(./pants list --changed-parent=HEAD~1 2>&1)"
so that I can visually log the targets that will run.
I have an open question about the use of --changed-parent=HEAD~1
, whereby if a team member pushes an unsquashed/unrebased set of commits, it seems that it might not pick up all the changes. I might look into enforcing this on the git side.