Skip to content

Commit

Permalink
Stricten working directory tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Jan 28, 2024
1 parent 53f35de commit 264ec53
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
uses: therussiankid92/gat@v1
with:
assertion: should.equal
expected: v1
expected: 1.8.38
actual: ${{ steps.previoustag.outputs.tag }}
get-previous-tag:
name: Test Get Previous Tag on ${{ matrix.os }}
Expand Down
2 changes: 2 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ const fs = require('fs');
const tagPrefix = `${process.env.INPUT_PREFIX || ''}*`;
const workingDirectory = process.env.INPUT_WORKINGDIRECTORY || null;

console.log('\x1b[33m%s\x1b[0m', 'Working directory: ' + workingDirectory);

exec(`git for-each-ref --sort=-creatordate --count 1 --format="%(refname:short)" "refs/tags/${tagPrefix}"`, {cwd: workingDirectory}, (err, tag, stderr) => {
tag = tag.trim();

Expand Down

0 comments on commit 264ec53

Please sign in to comment.