diff options
Diffstat (limited to 'build.js')
-rw-r--r-- | build.js | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -3,12 +3,13 @@ fs.copyFileSync(__dirname + "/package.json", __dirname + "/package.json.old"); let id = require('child_process').execSync("git rev-parse HEAD", { cwd: __dirname }).toString().trim().substring(0, 7); -const pkg = require("./package.json"); +const pkg = require(__dirname + "/package.json"); const child_process = require("child_process"); pkg.version = pkg.version.split("-")[0] + "-dev." + Math.round(new Date().getTime() / 1000).toString() + "-" + id + ".0"; -fs.writeFileSync("./package.json", JSON.stringify(pkg, null, 2)); +fs.writeFileSync(__dirname + "/package.json", JSON.stringify(pkg, null, 2)); -child_process.execSync("npx npm-deprecate -n *-dev.* --message \"This version of Signal.js was built automatically and is not the latest version. No support will be provided.\""); child_process.execSync("npm publish --tag dev", { cwd: __dirname, stdio: "inherit" }); +process.env.NODE_AUTH_TOKEN = fs.readFileSync(__dirname + "/.token").toString().trim(); +child_process.execSync("npx npm-deprecate -p @equestria.dev/signal.js -n *-dev.* --message \"This version of Signal.js was built automatically and is not the latest version. No support will be provided.\"", { cwd: __dirname, stdio: "inherit" }); fs.copyFileSync(__dirname + "/package.json.old", __dirname + "/package.json"); fs.unlinkSync(__dirname + "/package.json.old");
\ No newline at end of file |