Skip to content

Commit

Permalink
fix: Trim \n from the latest tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jamacku committed Nov 4, 2022
1 parent 20c65cf commit 1bce2d1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
4 changes: 3 additions & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion dist/tag.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/tag.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion src/tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ export class Tag {
// Get latest tag sorted by date, currently impossible by using GitHub REST API
// Based on: https://gist.github.com/rponte/fdc0724dd984088606b0?permalink_comment_id=3475480#gistcomment-3475480
const { stdout, stderr } = await promiseExec(
'git tag --sort=committerdate | tail -1'
// Get rid of new lines - it causes issues when regex is to explicit (including `$`)
`git tag --sort=committerdate | tail -1 | tr -d '\n'`
);

const tag = stdout;
Expand Down

0 comments on commit 1bce2d1

Please sign in to comment.