* Whether HEAD released this package: true unless the newest ` @*` tag * on HEAD's history (excluding tags on HEAD itself) names the same version. * HEAD's own tags are excluded because the workflow verifies before the tags * are pushed, and a tag-push run has them on HEAD.
(name, version)
| 127 | * are pushed, and a tag-push run has them on HEAD. |
| 128 | */ |
| 129 | function releasedAtHead(name, version) { |
| 130 | const previous = git([ |
| 131 | 'tag', |
| 132 | '--list', |
| 133 | `${name}@*`, |
| 134 | '--merged', |
| 135 | 'HEAD', |
| 136 | '--no-contains', |
| 137 | 'HEAD', |
| 138 | '--sort=-creatordate', |
| 139 | ]).split('\n')[0]; |
| 140 | return !previous || previous.slice(name.length + 1) !== version; |
| 141 | } |
| 142 | |
| 143 | function delay(ms) { |
| 144 | return new Promise(resolve => setTimeout(resolve, ms)); |