Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
Merge pull request #16 from bvanjoi/upload
Browse files Browse the repository at this point in the history
fix the upload script
  • Loading branch information
bvanjoi authored Dec 26, 2023
2 parents 15040a9 + b81e03a commit 926a18a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/upload.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const fs = require('fs/promises');
const fsSync = require('fs');
const { spawn } = require('child_process');
const { PACKAGE_DIR, ROOT_DIR, readCompat } = require('./utils');
const assert = require('assert');

async function runCommand(
command,
Expand Down Expand Up @@ -30,7 +31,7 @@ async function runCommand(
throw new Error(`${command} ${args.join(" ")} failed with ${exitCode}`);
}

const dataDir = path.resolve(root, '.data');
const dataDir = path.resolve(ROOT_DIR, '.data');

/**
* @param {string[]} args
Expand All @@ -43,9 +44,9 @@ async function run(args) {
await fs.writeFile(abs, jsonStr)

const token = args[0];
ok(typeof token === 'string');
assert(typeof token === 'string');
const GITHUB_ACTOR = process.env.GITHUB_ACTOR;
ok(typeof GITHUB_ACTOR === 'string');
assert(typeof GITHUB_ACTOR === 'string');
const repoUrl = `https://${GITHUB_ACTOR}:${token}@github.com/web-infra-dev/rspack-compat.git`;

if (!fsSync.existsSync(dataDir)) {
Expand Down

0 comments on commit 926a18a

Please sign in to comment.