提取 github 变量

This commit is contained in:
lutinglt committed 2025-06-28 19:36:06 +08:00
1 parent a8bcd45791
commit df6eb8fef8
8 files changed
+103 -71

No files matched your search

+4 -4
View File
@@ -1,8 +1,8 @@
const fs = require('fs');
const path = require('path');
const fs = require("fs");
const path = require("path");
const pkgPath = path.join(__dirname, '..', 'package.json');
const pkgPath = path.join(__dirname, "..", "package.json");
const pkg = JSON.parse(fs.readFileSync(pkgPath));
const version = pkg.version;
console.log(version);
console.log(version);