Skip to content

Commit

Permalink
Change how extension is received
Browse files Browse the repository at this point in the history
  • Loading branch information
d10sfan committed May 26, 2020
1 parent 2a0b08a commit 39c99ce
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,8 @@ console.log('Starting.');
async function run() {
try {
const folderName = core.getInput('name');
const extension = '.tar.xz';

const files = await fs.readdir(folderName);
console.log(files);
const matrix = {
Expand All @@ -520,9 +522,9 @@ async function run() {

for(let i = 0; i < files.length; i++) {
matrix.include.push({
name: path.parse(files[i]).name,
name: path.basename(files[i], extension),
fileName: path.join(folderName, files[i]),
extension: path.parse(files[i]).ext
extension: extension
});
}

Expand Down
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ console.log('Starting.');
async function run() {
try {
const folderName = core.getInput('name');
const extension = '.tar.xz';

const files = await fs.readdir(folderName);
console.log(files);
const matrix = {
Expand All @@ -16,9 +18,9 @@ async function run() {

for(let i = 0; i < files.length; i++) {
matrix.include.push({
name: path.parse(files[i]).name,
name: path.basename(files[i], extension),
fileName: path.join(folderName, files[i]),
extension: path.parse(files[i]).ext
extension: extension
});
}

Expand Down

0 comments on commit 39c99ce

Please sign in to comment.