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
47e5ebe0
Unverified
Commit
47e5ebe0
authored
Oct 25, 2022
by
JJ Kasper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update publish
parent
bee52154
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
14 deletions
+27
-14
publish-native.js
scripts/publish-native.js
+27
-8
publish-release.js
scripts/publish-release.js
+0
-6
No files found.
scripts/publish-native.js
View file @
47e5ebe0
...
@@ -55,10 +55,10 @@ const cwd = process.cwd()
...
@@ -55,10 +55,10 @@ const cwd = process.cwd()
)
{
)
{
console
.
error
(
'Ignoring already published error'
,
platform
)
console
.
error
(
'Ignoring already published error'
,
platform
)
}
else
{
}
else
{
throw
err
//
throw err
}
}
}
}
// lerna publish in next step
w
ill fail if git status is not clean
// lerna publish in next step
s
ill fail if git status is not clean
execSync
(
execSync
(
`git update-index --skip-worktree
${
path
.
join
(
`git update-index --skip-worktree
${
path
.
join
(
nativePackagesDir
,
nativePackagesDir
,
...
@@ -81,12 +81,31 @@ const cwd = process.cwd()
...
@@ -81,12 +81,31 @@ const cwd = process.cwd()
path
.
join
(
wasmDir
,
`pkg-
${
wasmTarget
}
/package.json`
),
path
.
join
(
wasmDir
,
`pkg-
${
wasmTarget
}
/package.json`
),
JSON
.
stringify
(
wasmPkg
,
null
,
2
)
JSON
.
stringify
(
wasmPkg
,
null
,
2
)
)
)
execSync
(
`npm publish
${
path
.
join
(
try
{
wasmDir
,
execSync
(
`pkg-
${
wasmTarget
}
`
`npm publish
${
path
.
join
(
)}
--access public
${
gitref
.
includes
(
'canary'
)
?
' --tag canary'
:
''
}
`
wasmDir
,
)
`pkg-
${
wasmTarget
}
`
)}
--access public
${
gitref
.
includes
(
'canary'
)
?
' --tag canary'
:
''
}
`
)
}
catch
(
err
)
{
// don't block publishing other versions on single platform error
console
.
error
(
`Failed to publish`
,
wasmTarget
)
if
(
err
.
message
&&
err
.
message
.
includes
(
'You cannot publish over the previously published versions'
)
)
{
console
.
error
(
'Ignoring already published error'
,
wasmTarget
)
}
else
{
// throw err
}
}
}
}
// Update optional dependencies versions
// Update optional dependencies versions
...
...
scripts/publish-release.js
View file @
47e5ebe0
...
@@ -34,12 +34,6 @@ const cwd = process.cwd()
...
@@ -34,12 +34,6 @@ const cwd = process.cwd()
}
}
console
.
log
(
`Publishing
${
isCanary
?
'canary'
:
'stable'
}
`
)
console
.
log
(
`Publishing
${
isCanary
?
'canary'
:
'stable'
}
`
)
// TODO: remove after testing, this is a safe guard to ensure we
// don't publish stable unexpectedly
if
(
!
isCanary
)
{
return
}
const
packagesDir
=
path
.
join
(
cwd
,
'packages'
)
const
packagesDir
=
path
.
join
(
cwd
,
'packages'
)
const
packageDirs
=
await
readdir
(
packagesDir
)
const
packageDirs
=
await
readdir
(
packagesDir
)
...
...
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