From 409809c9cc6f9dee1f7bd1aebbe2148c29a3ae30 Mon Sep 17 00:00:00 2001 From: shaharzil Date: Mon, 18 Mar 2024 15:04:35 +0200 Subject: [PATCH] deleted wrong script --- .../scripts/copy-mixins-to-dist.sh | 0 .../storybook-blocks/scripts/prerelease.mjs | 29 ------------------- 2 files changed, 29 deletions(-) create mode 100644 packages/storybook-blocks/scripts/copy-mixins-to-dist.sh delete mode 100755 packages/storybook-blocks/scripts/prerelease.mjs diff --git a/packages/storybook-blocks/scripts/copy-mixins-to-dist.sh b/packages/storybook-blocks/scripts/copy-mixins-to-dist.sh new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/storybook-blocks/scripts/prerelease.mjs b/packages/storybook-blocks/scripts/prerelease.mjs deleted file mode 100755 index a4648b903b..0000000000 --- a/packages/storybook-blocks/scripts/prerelease.mjs +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node - -import { execaSync } from 'execa'; - -function getVersionPreid() { - const branchName = process.env.BRANCH_NAME; - const commitSHA = process.env.COMMIT_SHA; - - // Find the last occurrence of the '/' character - const index = branchName.lastIndexOf('/'); - let finalPrName = branchName.replaceAll('_', '-'); - // If the character was found, return the substring after it - if (index !== -1) { - finalPrName = branchName.substring(index + 1); - } - - return `${finalPrName}-${commitSHA.substring(0, 10)}`; -} - -function pushBumpedVersion() { - const preid = getVersionPreid(); - const { stdout } = execaSync('npm', ['version', 'prerelease', `--preid=${preid}`, '--no-git-tag-version']); - const versionId = stdout.toString().trim(); - - // Notify new prerelease version was created - console.log(`New prerelease version was created: ${versionId}`); -} - -pushBumpedVersion();