Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publish flow fixes #28050

Merged
merged 4 commits into from Aug 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions scripts/publish-native.js
Expand Up @@ -15,7 +15,7 @@ const cwd = process.cwd()

// Copy binaries to package folders, update version, and publish
let nativePackagesDir = path.join(cwd, 'packages/next/build/swc/npm')
let platforms = await (await readdir(nativePackagesDir)).filter(
let platforms = await readdir(nativePackagesDir).filter(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this await readdir still needs to be wrapped

(name) => name !== '.gitignore'
)
for (let platform of platforms) {
Expand All @@ -33,9 +33,10 @@ const cwd = process.cwd()
JSON.stringify(pkg, null, 2)
)
execSync(
`npm publish ${path.join(nativePackagesDir, platform)}${
gitref.includes('canary') ? ' --tag canary' : ''
}`
`npm publish ${path.join(
nativePackagesDir,
platform
)} --access public ${gitref.includes('canary') ? ' --tag canary' : ''}`
)
// lerna publish in next step will fail if git status is not clean
execSync(
Expand Down
4 changes: 2 additions & 2 deletions scripts/publish-release.sh
Expand Up @@ -15,7 +15,7 @@ fi
if [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];
then
echo "Publishing canary"
yarn run lerna publish from-git --npm-tag canary --yes
yarn run lerna publish from-git --npm-tag canary --no-git-reset --yes
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--no-git-reset makes lerna okay with git update-index --skip-worktree. It seems like we would be interested in the feature proposed in this issue.


# Make sure to exit script with code 1 if publish failed
if [[ ! $? -eq 0 ]];then
Expand All @@ -27,7 +27,7 @@ fi

if [[ ! $(git describe --exact-match 2> /dev/null || :) =~ -canary ]];then
echo "Publishing stable"
yarn run lerna publish from-git --yes
yarn run lerna publish from-git --no-git-reset --yes

# Make sure to exit script with code 1 if publish failed
if [[ ! $? -eq 0 ]];then
Expand Down