Refactor
This commit is contained in:
@@ -3,7 +3,7 @@ import * as path from 'path'
|
||||
import { chdir } from 'process'
|
||||
import { exec } from './util'
|
||||
|
||||
export default async function (info: any) {
|
||||
export default async function(info: any) {
|
||||
for (const snapFile of info.artifactPaths) {
|
||||
if (/\.snap$/.test(snapFile)) {
|
||||
const originalDir = __dirname
|
||||
|
||||
@@ -73,7 +73,7 @@ async function uploadFile(uploadUrl: string, file: string) {
|
||||
const data = fs.readFileSync(file)
|
||||
const mimeType = mime.getType(path.extname(file))
|
||||
|
||||
return await axios({
|
||||
return axios({
|
||||
data,
|
||||
method: 'post',
|
||||
url: `${uploadUrl}?name=${path.basename(file)}&access_token=${githubToken}`,
|
||||
|
||||
Reference in New Issue
Block a user