Initial commit: BRAT fork with Gitea support
Tatortreiniger / tatort-reinigen (release) Has been cancelled
Tatortreiniger / tatort-reinigen (release) Has been cancelled
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import { exec } from "node:child_process";
|
||||
import fs from "node:fs";
|
||||
|
||||
// Read the manifest.json file
|
||||
fs.readFile("manifest.json", "utf8", (err, data) => {
|
||||
if (err) {
|
||||
console.error(`Error reading file from disk: ${err}`);
|
||||
} else {
|
||||
// Parse the file content to a JavaScript object
|
||||
const manifest = JSON.parse(data);
|
||||
|
||||
// Extract the version
|
||||
const version = manifest.version;
|
||||
|
||||
// Execute the git commands
|
||||
exec(
|
||||
`git tag -a ${version} -m "${version}" && git push origin ${version}`,
|
||||
(error, stdout, stderr) => {
|
||||
if (error) {
|
||||
console.error(`exec error: ${error}`);
|
||||
return;
|
||||
}
|
||||
console.log(`stdout: ${stdout}`);
|
||||
console.error(`stderr: ${stderr}`);
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user