yarn build --since <commithash>|<numberof commits> not building anything.
Describe the bug yarn build --since with commit hash or number of commits are not working
Also, it shouldn't build the dependencies. Instead it should do other way round (Let's say if package file got changed, then we should build whoever(apps) using the package
To Reproduce
Steps to reproduce the behavior:
yarn build --since |
yarn build --since 2
[ Summary ]---------------------------------------------------------------------
Success: 0
Fail: 0
Skipped: 0
Up to date: 0
Total: 0
Runtime (wall): 0.01s [ build finished ]-------------------------------------------------------------- ➤ YN0000: Done in 0s 12ms
Expected behavior build should happen
Desktop (please complete the following information):
- OS: macOS
@ojkelly
It started to partially work after adding --relative as an argument to git diff. However, building dependencies is still an issue
https://github.com/ojkelly/yarn.build/blob/main/packages/plugins/shared/src/changes.ts#L14 https://github.com/ojkelly/yarn.build/blob/main/packages/plugins/shared/src/changes.ts#L17
if (options.commit) {
cmd = `git diff --name-only --relative ..${options.commit}`;
}
if (options.sinceBranch && options.sinceBranch.length > 0) {
cmd = `git diff --name-only --relative ${options.sinceBranch}...`;
}
Do you think it would be valuable for you also to be able to do something like yarn build --diff $ where the result is just passed to git diff directly?
I'm also working on a cleaner and better tested approach to determining what to build, that is working to address this.
Yes. that sounds good