@@ -4,7 +4,6 @@ import { readFileSync, mkdirSync, writeFileSync, readdirSync } from "fs";
|
|||||||
const libName = process.env.PWD.split("/").slice(-1)[0];
|
const libName = process.env.PWD.split("/").slice(-1)[0];
|
||||||
const version = readFileSync("version", { encoding: "utf8" });
|
const version = readFileSync("version", { encoding: "utf8" });
|
||||||
const repoBaseUrl = `${process.env.INPUT_REPO_URL}/${libName}/${version}`;
|
const repoBaseUrl = `${process.env.INPUT_REPO_URL}/${libName}/${version}`;
|
||||||
console.log(process.env.INPUT_REPO_URL, libName, version);
|
|
||||||
const packageJsonUrls = [];
|
const packageJsonUrls = [];
|
||||||
|
|
||||||
const sendFile = async (urlPath, data) => {
|
const sendFile = async (urlPath, data) => {
|
||||||
@@ -48,13 +47,10 @@ const doIt = async () => {
|
|||||||
await sendFile(modPyPath, readFileSync(`${modName}.mpy`).buffer);
|
await sendFile(modPyPath, readFileSync(`${modName}.mpy`).buffer);
|
||||||
|
|
||||||
// Update urls
|
// Update urls
|
||||||
console.log("FARTS");
|
|
||||||
packageJsonUrls.push([`${libName}/${modInitPath}`, "__init__.mpy"]);
|
packageJsonUrls.push([`${libName}/${modInitPath}`, "__init__.mpy"]);
|
||||||
packageJsonUrls.push([`${libName}/${modName}/${modPyPath}`, modPyPath]);
|
packageJsonUrls.push([`${libName}/${modName}/${modPyPath}`, modPyPath]);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(packageJsonUrls);
|
|
||||||
|
|
||||||
// Add package.json to repo
|
// Add package.json to repo
|
||||||
await sendFile(
|
await sendFile(
|
||||||
`package.json`,
|
`package.json`,
|
||||||
|
|||||||
Reference in New Issue
Block a user