Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
44eba020
Unverified
Commit
44eba020
authored
Sep 19, 2023
by
Tobias Koppers
Committed by
GitHub
Sep 19, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve publish-release (#55597)
Closes WEB-1608
parent
c652dc88
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
publish-release.js
scripts/publish-release.js
+12
-9
No files found.
scripts/publish-release.js
View file @
44eba020
...
@@ -56,6 +56,8 @@ const cwd = process.cwd()
...
@@ -56,6 +56,8 @@ const cwd = process.cwd()
],
],
{
stdio
:
'inherit'
}
{
stdio
:
'inherit'
}
)
)
// Return here to avoid retry logic
return
}
catch
(
err
)
{
}
catch
(
err
)
{
console
.
error
(
`Failed to publish
${
pkg
}
`
,
err
)
console
.
error
(
`Failed to publish
${
pkg
}
`
,
err
)
...
@@ -69,7 +71,13 @@ const cwd = process.cwd()
...
@@ -69,7 +71,13 @@ const cwd = process.cwd()
return
return
}
}
if
(
retry
<
3
)
{
if
(
retry
>=
3
)
{
throw
err
}
}
finally
{
publishSema
.
release
()
}
// Recursive call need to be outside of the publishSema
const
retryDelaySeconds
=
15
const
retryDelaySeconds
=
15
console
.
log
(
`retrying in
${
retryDelaySeconds
}
s`
)
console
.
log
(
`retrying in
${
retryDelaySeconds
}
s`
)
await
new
Promise
((
resolve
)
=>
await
new
Promise
((
resolve
)
=>
...
@@ -77,13 +85,8 @@ const cwd = process.cwd()
...
@@ -77,13 +85,8 @@ const cwd = process.cwd()
)
)
await
publish
(
pkg
,
retry
+
1
)
await
publish
(
pkg
,
retry
+
1
)
}
}
throw
err
}
finally
{
publishSema
.
release
()
}
}
await
Promise
.
all
(
await
Promise
.
all
Settled
(
packageDirs
.
map
(
async
(
packageDir
)
=>
{
packageDirs
.
map
(
async
(
packageDir
)
=>
{
const
pkgJson
=
await
readJson
(
const
pkgJson
=
await
readJson
(
path
.
join
(
packagesDir
,
packageDir
,
'package.json'
)
path
.
join
(
packagesDir
,
packageDir
,
'package.json'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment