diff --git a/cli/UploadSourcemaps.ts b/cli/UploadSourcemaps.ts index 5f86329e18..d2a9315b40 100755 --- a/cli/UploadSourcemaps.ts +++ b/cli/UploadSourcemaps.ts @@ -2,11 +2,10 @@ import axios from 'axios'; import { Command, Option } from 'commander'; import FormData from 'form-data'; import fs from 'fs'; -import path from 'path'; interface UploadSourcemapsOptions { platform: 'android' | 'ios'; - dir: string; + file: string; token: string; name: string; code: string; @@ -23,10 +22,7 @@ uploadSourcemapsCommand .makeOptionMandatory(), ) .addOption( - new Option( - '-d, --dir ', - 'The path of the directory including the source map file', - ).makeOptionMandatory(), + new Option('-f, --file ', 'The path of the source map file').makeOptionMandatory(), ) .addOption( new Option('-t, --token ', 'Your App Token') @@ -56,8 +52,7 @@ uploadSourcemapsCommand const uploadSourcemaps = async (opts: UploadSourcemapsOptions) => { const fileName = `${opts.platform}-sourcemap.json`; - const filePath = path.join(opts.dir, fileName); - const fileBlob = fs.readFileSync(filePath); + const fileBlob = fs.readFileSync(opts.file); const version = { code: opts.code,