Fixed release script with new doc building mechanism.

This commit is contained in:
SamTV12345 2023-06-21 08:04:43 +02:00
parent 4ca30166b8
commit 291f07dcf1
No known key found for this signature in database
GPG key ID: E63EEC7466038043

View file

@ -9,6 +9,7 @@ const childProcess = require('child_process');
const log4js = require('log4js');
const path = require('path');
const semver = require('semver');
const {exec} = require("child_process");
log4js.replaceConsole();
@ -76,6 +77,15 @@ const assertUpstreamOk = (branch, opts = {}) => {
}
};
// Check if asciidoctor is installed
exec('asciidoctor -v', (err,stdout)=>{
if (err){
console.log('Please install asciidoctor')
console.log('https://asciidoctor.org/docs/install-toolchain/')
process.exit(1)
}
});
const dirExists = (dir) => {
try {
return fs.statSync(dir).isDirectory();
@ -168,7 +178,7 @@ try {
try {
console.log('Building documentation...');
run('make docs');
run('node ./make_docs.js');
console.log('Updating ether.github.com master branch...');
run('git pull --ff-only', {cwd: '../ether.github.com/'});
console.log('Committing documentation...');