INNER CODE UNIT · TypeScript

releaseFile

GuoXiCheng/SKIP · scripts/release-file.ts:8

export function releaseFile(options: ReleaseFileOptions) {
  const { apkPath, releasePath } = options;
  if (!fs.existsSync(apkPath) || !fs.existsSync(releasePath)) {
    throw new Error("apk path and release path should exist");
  }

  const apkFileList = fs.readdirSync(apkPath);

  if (apkFileList.length !== 1) {
    throw new Error("apk path should contain only one file");
  }

  const apkFile = apkFileList[0];
  if (!apkFile.endsWith(".apk")) {
    throw new Error("apk file should end with .apk");
  }

  const regex = /SKIP-v(\d+\.\d+\.\d+)\.apk/;

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…