Skip to content

Commit c8274e2

Browse files
authored
ci(shipjs): only tag non-tagged packages (#5466)
* ci(shipjs): only tag non-tagged packages * simpler
1 parent 2253d9e commit c8274e2

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

ship.config.js

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,16 @@ const packages = JSON.parse(
55
silent: true,
66
})
77
);
8-
const changedPackages = JSON.parse(
9-
shell.exec('yarn run --silent lerna list --toposort --json', {
10-
silent: true,
11-
})
12-
);
8+
const changedPackages = packages
9+
.map((package) => ({
10+
...package,
11+
isPublished: Boolean(
12+
shell.exec(`git tag -l ${package.name}@${package.version}`, {
13+
silent: true,
14+
}).stdout
15+
),
16+
}))
17+
.filter(({ isPublished }) => !isPublished);
1318

1419
module.exports = {
1520
shouldPrepare: () => {

0 commit comments

Comments
 (0)