mirror of https://github.com/sualko/cloud_bbb
chore: update release scripts
parent
19d588b300
commit
99208709c6
|
@ -5,8 +5,7 @@ const path = require('path');
|
||||||
const libxml = require('libxmljs');
|
const libxml = require('libxmljs');
|
||||||
const https = require('https');
|
const https = require('https');
|
||||||
const archiver = require('archiver');
|
const archiver = require('archiver');
|
||||||
const execa = require('execa');
|
const simpleGit = require('simple-git');
|
||||||
const simpleGit = require('simple-git/promise');
|
|
||||||
const inquirer = require('inquirer');
|
const inquirer = require('inquirer');
|
||||||
const { exec } = require('child_process');
|
const { exec } = require('child_process');
|
||||||
const { generateChangelog, hasChangeLogEntry } = require('./imports/changelog');
|
const { generateChangelog, hasChangeLogEntry } = require('./imports/changelog');
|
||||||
|
@ -69,6 +68,8 @@ async function createRelease(appId) {
|
||||||
console.log('✔ repo is clean'.green);
|
console.log('✔ repo is clean'.green);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const execa = (await import('execa')).execaCommand;
|
||||||
|
|
||||||
await execa('yarn', ['composer:install:dev']);
|
await execa('yarn', ['composer:install:dev']);
|
||||||
console.log('✔ composer dev dependencies installed'.green);
|
console.log('✔ composer dev dependencies installed'.green);
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,14 @@ const colors = require('colors');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const https = require('https');
|
const https = require('https');
|
||||||
const execa = require('execa');
|
const simpleGit = require('simple-git');
|
||||||
const simpleGit = require('simple-git/promise');
|
|
||||||
const inquirer = require('inquirer');
|
const inquirer = require('inquirer');
|
||||||
const dotenv = require('dotenv');
|
const dotenv = require('dotenv');
|
||||||
const { Octokit } = require('@octokit/rest');
|
const { Octokit } = require('@octokit/rest');
|
||||||
const { getChangelogEntry, hasChangeLogEntry } = require('./imports/changelog');
|
const { getChangelogEntry, hasChangeLogEntry } = require('./imports/changelog');
|
||||||
|
|
||||||
|
const getExeca = async () => (await import('execa')).execaCommand;
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
// eslint-disable-next-line @typescript-eslint/no-var-requires
|
||||||
const packageInfo = require('../package.json');
|
const packageInfo = require('../package.json');
|
||||||
|
|
||||||
|
@ -63,19 +64,11 @@ async function stageAllFiles() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const gitProcess = execa('git', ['add', '-u']);
|
await git.raw('add', '-u');
|
||||||
|
|
||||||
gitProcess.stdout.pipe(process.stdout);
|
|
||||||
|
|
||||||
return gitProcess;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showStagedDiff() {
|
async function showStagedDiff() {
|
||||||
const gitProcess = execa('git', ['diff', '--staged']);
|
console.log(await git.raw('diff', '--staged'));
|
||||||
|
|
||||||
gitProcess.stdout.pipe(process.stdout);
|
|
||||||
|
|
||||||
return gitProcess;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function keypress() {
|
async function keypress() {
|
||||||
|
@ -141,6 +134,7 @@ async function createGithubRelease(changeLog) {
|
||||||
name: `BigBlueButton Integration ${tagName}`,
|
name: `BigBlueButton Integration ${tagName}`,
|
||||||
body: changeLog.replace(/^## [^\n]+\n/, ''),
|
body: changeLog.replace(/^## [^\n]+\n/, ''),
|
||||||
prerelease: !/^\d+\.\d+\.\d+$/.test(packageInfo.version),
|
prerelease: !/^\d+\.\d+\.\d+$/.test(packageInfo.version),
|
||||||
|
draft: true,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (isDryRun) {
|
if (isDryRun) {
|
||||||
|
@ -251,6 +245,8 @@ async function uploadToNextcloudStore(archiveUrl) {
|
||||||
}
|
}
|
||||||
|
|
||||||
async function run() {
|
async function run() {
|
||||||
|
const execa = await getExeca();
|
||||||
|
|
||||||
await pull();
|
await pull();
|
||||||
console.log('✔ pulled latest changes'.green);
|
console.log('✔ pulled latest changes'.green);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue