Skip to content

Commit 5667f0f

Browse files
committed
refactor: refactor release tags
1 parent 29388ea commit 5667f0f

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

lib/git.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,14 @@ export default class Git extends CoreGit {
135135

136136
const releaseTags = {};
137137

138-
for ( const tag in tags ) {
138+
for ( const tag of Object.keys( tags ).sort( ( a, b ) => {
139+
try {
140+
return SemanticVersion.compare( a.replace( ".", "-" ), b.replace( ".", "-" ) );
141+
}
142+
catch {
143+
return a - b;
144+
}
145+
} ) ) {
139146
releaseTags[ tag ] = {
140147
"version": tags[ tag ].version,
141148
"action": null,

0 commit comments

Comments
 (0)