MCPcopy Create free account
hub / github.com/decaporg/decap-cms / releasedAtHead

Function releasedAtHead

scripts/verify-published-packages.mjs:129–141  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

127 * are pushed, and a tag-push run has them on HEAD.
128 */
129function 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
143function delay(ms) {
144 return new Promise(resolve => setTimeout(resolve, ms));

Callers 1

mainFunction · 0.85

Calls 1

gitFunction · 0.85

Tested by

no test coverage detected