Follow symbolic links (#186)
This commit is contained in:
parent
17cd0d34de
commit
b260a9f8a6
2
dist/index.js
vendored
2
dist/index.js
vendored
File diff suppressed because one or more lines are too long
@ -1,7 +1,7 @@
|
|||||||
import fetch from "node-fetch";
|
import fetch from "node-fetch";
|
||||||
import { GitHub } from "@actions/github/lib/utils";
|
import { GitHub } from "@actions/github/lib/utils";
|
||||||
import { Config, isTag, releaseBody } from "./util";
|
import { Config, isTag, releaseBody } from "./util";
|
||||||
import { lstatSync, readFileSync } from "fs";
|
import { statSync, readFileSync } from "fs";
|
||||||
import { getType } from "mime";
|
import { getType } from "mime";
|
||||||
import { basename } from "path";
|
import { basename } from "path";
|
||||||
|
|
||||||
@ -127,7 +127,7 @@ export const asset = (path: string): ReleaseAsset => {
|
|||||||
return {
|
return {
|
||||||
name: basename(path),
|
name: basename(path),
|
||||||
mime: mimeOrDefault(path),
|
mime: mimeOrDefault(path),
|
||||||
size: lstatSync(path).size,
|
size: statSync(path).size,
|
||||||
data: readFileSync(path)
|
data: readFileSync(path)
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import * as glob from "glob";
|
import * as glob from "glob";
|
||||||
import { lstatSync, readFileSync } from "fs";
|
import { statSync, readFileSync } from "fs";
|
||||||
|
|
||||||
export interface Config {
|
export interface Config {
|
||||||
github_token: string;
|
github_token: string;
|
||||||
@ -74,7 +74,7 @@ export const parseConfig = (env: Env): Config => {
|
|||||||
export const paths = (patterns: string[]): string[] => {
|
export const paths = (patterns: string[]): string[] => {
|
||||||
return patterns.reduce((acc: string[], pattern: string): string[] => {
|
return patterns.reduce((acc: string[], pattern: string): string[] => {
|
||||||
return acc.concat(
|
return acc.concat(
|
||||||
glob.sync(pattern).filter(path => lstatSync(path).isFile())
|
glob.sync(pattern).filter(path => statSync(path).isFile())
|
||||||
);
|
);
|
||||||
}, []);
|
}, []);
|
||||||
};
|
};
|
||||||
@ -82,7 +82,7 @@ export const paths = (patterns: string[]): string[] => {
|
|||||||
export const unmatchedPatterns = (patterns: string[]): string[] => {
|
export const unmatchedPatterns = (patterns: string[]): string[] => {
|
||||||
return patterns.reduce((acc: string[], pattern: string): string[] => {
|
return patterns.reduce((acc: string[], pattern: string): string[] => {
|
||||||
return acc.concat(
|
return acc.concat(
|
||||||
glob.sync(pattern).filter(path => lstatSync(path).isFile()).length == 0
|
glob.sync(pattern).filter(path => statSync(path).isFile()).length == 0
|
||||||
? [pattern]
|
? [pattern]
|
||||||
: []
|
: []
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user