Skip to content

Commit

Permalink
fix(@artusx/rush-utils): sort tags with semver
Browse files Browse the repository at this point in the history
  • Loading branch information
thonatos committed Apr 4, 2024
1 parent 6cfc1ad commit 88bdefb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions toolchains/rush-utils/src/service/git.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import fs from 'fs';
import semver from 'semver';
import runScript from 'runscript';
import { Injectable } from '@artus-cli/artus-cli';
import BaseService from './base';
Expand All @@ -9,6 +10,7 @@ export default class GitService extends BaseService {
const git = await import('isomorphic-git');
try {
const tags = await git.listTags({ fs, dir: _cwd });
tags.sort((a, b) => semver.compare(a, b));
return tags[tags.length - 1];
} catch (error) {
this.logger.error(error);
Expand Down

0 comments on commit 88bdefb

Please sign in to comment.