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
0bcba460
Commit
0bcba460
authored
Oct 26, 2023
by
Jimmy Lai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix publish script
parent
92b4d673
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
start-release.js
scripts/start-release.js
+4
-2
No files found.
scripts/start-release.js
View file @
0bcba460
...
@@ -76,6 +76,8 @@ async function waitForPrompt(cp, rawAssertion, timeout = 3000) {
...
@@ -76,6 +76,8 @@ async function waitForPrompt(cp, rawAssertion, timeout = 3000) {
})
})
}
}
const
SEMVER_TYPES
=
[
'patch'
,
'minor'
,
'major'
]
async
function
main
()
{
async
function
main
()
{
const
args
=
process
.
argv
const
args
=
process
.
argv
const
releaseType
=
args
[
args
.
indexOf
(
'--release-type'
)
+
1
]
const
releaseType
=
args
[
args
.
indexOf
(
'--release-type'
)
+
1
]
...
@@ -86,9 +88,9 @@ async function main() {
...
@@ -86,9 +88,9 @@ async function main() {
console
.
log
(
`Invalid release type
${
releaseType
}
, must be stable or canary`
)
console
.
log
(
`Invalid release type
${
releaseType
}
, must be stable or canary`
)
return
return
}
}
if
(
!
isCanary
&&
!
[
'patch'
,
'minor'
,
'stable'
]
.
includes
(
semverType
))
{
if
(
!
isCanary
&&
!
SEMVER_TYPES
.
includes
(
semverType
))
{
console
.
log
(
console
.
log
(
`Invalid semver type
${
semverType
}
, must be one of
${
semverType
.
join
(
`Invalid semver type
${
semverType
}
, must be one of
${
SEMVER_TYPES
.
join
(
', '
', '
)}
`
)}
`
)
)
...
...
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