* Bump file IDs added to `.bumpy/ /` by the push that triggered this run. * * This is the channel publish trigger: merging the release PR moves files into the * channel dir; ordinary feature merges don't touch it. Re-running on the same push is * idempotent — packages already published f
(rootDir: string, channel: ResolvedChannel)
| 948 | * gitHead recorded on the registry. |
| 949 | */ |
| 950 | function detectChannelMoves(rootDir: string, channel: ResolvedChannel): string[] { |
| 951 | const range = getPushEventRange(); |
| 952 | let diffRange: string; |
| 953 | if (range) { |
| 954 | diffRange = `${range.before}..${range.after}`; |
| 955 | } else { |
| 956 | if (!tryRunArgs(['git', 'rev-parse', '--verify', 'HEAD^'], { cwd: rootDir })) { |
| 957 | log.warn( |
| 958 | 'Cannot diff against the previous commit (shallow clone?) — channel publish trigger unavailable.\n' + |
| 959 | ' Use `fetch-depth: 0` in your checkout step, or run `bumpy publish` manually on the channel branch.', |
| 960 | ); |
| 961 | return []; |
| 962 | } |
| 963 | diffRange = 'HEAD^..HEAD'; |
| 964 | } |
| 965 | |
| 966 | // --no-renames so file moves into the channel dir show up as additions |
| 967 | const out = tryRunArgs( |
| 968 | ['git', 'diff', '--name-only', '--diff-filter=A', '--no-renames', diffRange, '--', `.bumpy/${channel.name}/`], |
| 969 | { cwd: rootDir }, |
| 970 | ); |
| 971 | if (!out) return []; |
| 972 | return out |
| 973 | .split('\n') |
| 974 | .filter((f) => f.endsWith('.md') && !f.endsWith('README.md')) |
| 975 | .map((f) => f.split('/').pop()!.replace(/\.md$/, '')); |
| 976 | } |
| 977 | |
| 978 | /** |
| 979 | * CI release on a channel branch. Two independent steps, both of which can run |
no test coverage detected
searching dependent graphs…