From e4650ef0659c17cbf347e2dbe08f285c4f0c2bec Mon Sep 17 00:00:00 2001 From: Matthew Glissmann Date: Mon, 22 Jul 2024 18:57:31 -0600 Subject: [PATCH] update release-stable (#114) --- grommet-leaflet/tools/release-stable.mjs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/grommet-leaflet/tools/release-stable.mjs b/grommet-leaflet/tools/release-stable.mjs index 27794b9..9895b35 100644 --- a/grommet-leaflet/tools/release-stable.mjs +++ b/grommet-leaflet/tools/release-stable.mjs @@ -7,6 +7,7 @@ import 'dotenv/config'; const repoURL = `https://${process.env.GH_TOKEN}@github.com/grommet/grommet-leaflet.git`; const localFolder = path.resolve('.tmp/grommet-leaflet'); const localDist = path.resolve('dist'); +const localLibrary = path.resolve('lib'); const BRANCH = 'grommet-leaflet-stable'; @@ -15,14 +16,10 @@ if (process.env.CI) { git() .clone(repoURL, localFolder) .then(() => git(localFolder).checkout(BRANCH)) - .then(() => - deleteAsync([ - `${localFolder}/**/*`, - `!${localFolder}/grommet-leaflet`, - `!${localFolder}/*/package.json`, - ]), - ) + .then(() => fs.move('package.json', `${localLibrary}/package.json`)) + .then(() => deleteAsync([`${localFolder}/**/*`])) .then(() => { + fs.copy(localLibrary, localFolder); fs.copy(localDist, `${localFolder}/dist`); }) .then(() => git(localFolder).add(['--all', '.']))