mirror of
https://github.com/ragestudio/comty.git
synced 2025-06-09 10:34:17 +00:00
fix package.json read
This commit is contained in:
parent
467c96fe72
commit
fef09f8046
@ -1,7 +1,6 @@
|
|||||||
import dotenv from "dotenv"
|
import dotenv from "dotenv"
|
||||||
dotenv.config()
|
dotenv.config()
|
||||||
|
|
||||||
import packagejson from "../package.json" assert { type: "json" }
|
|
||||||
import path from "path"
|
import path from "path"
|
||||||
import fs from "fs"
|
import fs from "fs"
|
||||||
import child_process from "child_process"
|
import child_process from "child_process"
|
||||||
@ -27,6 +26,14 @@ async function main() {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let packagejson = fs.readFileSync(
|
||||||
|
path.join(process.cwd(), "./package.json"),
|
||||||
|
"utf8",
|
||||||
|
)
|
||||||
|
packagejson = JSON.parse(packagejson)
|
||||||
|
|
||||||
|
let currentVersion = packagejson.version
|
||||||
|
|
||||||
const octokit = new Octokit({
|
const octokit = new Octokit({
|
||||||
auth: process.env.GITHUB_TOKEN,
|
auth: process.env.GITHUB_TOKEN,
|
||||||
})
|
})
|
||||||
@ -79,8 +86,6 @@ async function main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let currentVersion = packagejson.version
|
|
||||||
|
|
||||||
// Verifica si la versión actual coincide con el último release en GitHub
|
// Verifica si la versión actual coincide con el último release en GitHub
|
||||||
const latestRelease = await octokit.repos
|
const latestRelease = await octokit.repos
|
||||||
.getLatestRelease({
|
.getLatestRelease({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user