moon: [bug] moon run --affected not working as moon ci (affected not gathered)

Describe the bug

The command moon ci is doing great by getting the touched files . However we can’t achieve the same result for an individual task like moon run --affected :test

moon run  --affected :test                                       

OUTPUT:

Target(s) :test not affected by touched files (using status all)

Steps to reproduce

  1. Create two libs
  2. Create a global task like :test
  3. Git add , commit everything
  4. Run moon ci (working)
  5. Run moon run --affected :test (Not working ! Not doing anything)

Expected behavior

To run the task on affected files like on moon ci

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16

Most upvoted comments

@spljs In the next release, so probably next Monday.

@spljs Yeah, this won’t work right now. moon ci is much smarter than moon run, as it diffs against the previous commit when on the same branch, moon run does not.

I’ll look into ways to support this.