From ca1b2e4d9bdce1338a2b6a03b9d75793161fb9e1 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 7 Nov 2022 15:21:50 +0100 Subject: [PATCH] scripts: remove isolated-release script Signed-off-by: Patrik Oldsberg --- scripts/isolated-release.js | 58 ------------------------------------- 1 file changed, 58 deletions(-) delete mode 100755 scripts/isolated-release.js diff --git a/scripts/isolated-release.js b/scripts/isolated-release.js deleted file mode 100755 index 4df900450e..0000000000 --- a/scripts/isolated-release.js +++ /dev/null @@ -1,58 +0,0 @@ -#!/usr/bin/env node -/* - * Copyright 2020 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -const path = require('path'); -const childProcess = require('child_process'); -const { getPackages } = require('@manypkg/get-packages'); - -// Prepare a release of the provided packages, e.g. @backstage/core -async function main(args) { - if (args.includes('--help') || args.length === 0) { - const arg0 = path.relative(process.cwd(), process.argv[1]); - console.log(`Usage: ${process.argv0} ${arg0} ...`); - process.exit(1); - } - - const { packages } = await getPackages(__dirname); - const ignoreArgs = packages - .filter(p => !args.includes(p.packageJson.name)) - .flatMap(p => ['--ignore', p.packageJson.name]); - - const { status } = childProcess.spawnSync( - 'yarn', - ['changeset', 'version', ...ignoreArgs], - { - stdio: 'inherit', - }, - ); - if (status !== 0) { - return; - } - - childProcess.spawnSync( - 'yarn', - ['prettier', '--write', '{packages,plugins}/*/{package.json,CHANGELOG.md}'], - { - stdio: 'inherit', - }, - ); -} - -main(process.argv.slice(2)).catch(error => { - console.error(error.stack); - process.exit(1); -});