chore: update release scripts

pull/220/head
sualko 2022-07-24 14:06:59 +02:00
parent 19d588b300
commit 99208709c6
2 changed files with 12 additions and 15 deletions

View File

@ -5,8 +5,7 @@ const path = require('path');
const libxml = require('libxmljs');
const https = require('https');
const archiver = require('archiver');
const execa = require('execa');
const simpleGit = require('simple-git/promise');
const simpleGit = require('simple-git');
const inquirer = require('inquirer');
const { exec } = require('child_process');
const { generateChangelog, hasChangeLogEntry } = require('./imports/changelog');
@ -69,6 +68,8 @@ async function createRelease(appId) {
console.log('✔ repo is clean'.green);
}
const execa = (await import('execa')).execaCommand;
await execa('yarn', ['composer:install:dev']);
console.log('✔ composer dev dependencies installed'.green);

View File

@ -3,13 +3,14 @@ const colors = require('colors');
const fs = require('fs');
const path = require('path');
const https = require('https');
const execa = require('execa');
const simpleGit = require('simple-git/promise');
const simpleGit = require('simple-git');
const inquirer = require('inquirer');
const dotenv = require('dotenv');
const { Octokit } = require('@octokit/rest');
const { getChangelogEntry, hasChangeLogEntry } = require('./imports/changelog');
const getExeca = async () => (await import('execa')).execaCommand;
// eslint-disable-next-line @typescript-eslint/no-var-requires
const packageInfo = require('../package.json');
@ -63,19 +64,11 @@ async function stageAllFiles() {
return;
}
const gitProcess = execa('git', ['add', '-u']);
gitProcess.stdout.pipe(process.stdout);
return gitProcess;
await git.raw('add', '-u');
}
function showStagedDiff() {
const gitProcess = execa('git', ['diff', '--staged']);
gitProcess.stdout.pipe(process.stdout);
return gitProcess;
async function showStagedDiff() {
console.log(await git.raw('diff', '--staged'));
}
async function keypress() {
@ -141,6 +134,7 @@ async function createGithubRelease(changeLog) {
name: `BigBlueButton Integration ${tagName}`,
body: changeLog.replace(/^## [^\n]+\n/, ''),
prerelease: !/^\d+\.\d+\.\d+$/.test(packageInfo.version),
draft: true,
};
if (isDryRun) {
@ -251,6 +245,8 @@ async function uploadToNextcloudStore(archiveUrl) {
}
async function run() {
const execa = await getExeca();
await pull();
console.log('✔ pulled latest changes'.green);