Skip to content

Commit

Permalink
Merge branch 'canary' into global-error
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Jul 12, 2023
2 parents 3e83588 + bcd9136 commit 7b89a69
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 7 deletions.
26 changes: 25 additions & 1 deletion .github/actions/next-stats-action/src/prepare/repo-setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,37 @@ module.exports = (actionInfo) => {
Array.from(pkgDatas.keys()).map(async (pkgName) => {
const { pkgPath, packedPkgPath } = pkgDatas.get(pkgName)

await execa('yarn', ['pack', '-f', packedPkgPath], {
let cleanup = null

if (pkgName === '@next/swc') {
// next-swc uses a gitignore to prevent the committing of native builds but it doesn't
// use files in package.json because it publishes to individual packages based on architecture.
// When we used yarn to pack these packages the gitignore was ignored so the native builds were packed
// however npm does respect gitignore when packing so we need to remove it in this specific case
// to ensure the native builds are packed for use in gh actions and related scripts
await fs.rename(
path.join(pkgPath, 'native/.gitignore'),
path.join(pkgPath, 'disabled-native-gitignore')
)
cleanup = async () => {
await fs.rename(
path.join(pkgPath, 'disabled-native-gitignore'),
path.join(pkgPath, 'native/.gitignore')
)
}
}

const { stdout } = await execa('npm', ['pack'], {
cwd: pkgPath,
env: {
...process.env,
COREPACK_ENABLE_STRICT: '0',
},
})
await fs.rename(path.resolve(pkgPath, stdout.trim()), packedPkgPath)
if (cleanup) {
await cleanup()
}
})
)
return pkgPaths
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@ jobs:
name: normalize versions

- run: turbo run build-native-release --remote-cache-timeout 90 --summarize -- --target x86_64-unknown-linux-gnu
if: ${{ inputs.skipNativeBuild != 'yes' }}
if: ${{ inputs.skipNativeBuild != 'yes' && steps.docs-change.outputs.DOCS_CHANGE == 'nope' }}

- name: Upload next-swc artifact
if: ${{ inputs.uploadSwcArtifact == 'yes' }}
if: ${{ inputs.uploadSwcArtifact == 'yes' && steps.docs-change.outputs.DOCS_CHANGE == 'nope' }}
uses: actions/upload-artifact@v3
with:
name: next-swc-binary
Expand Down
1 change: 0 additions & 1 deletion packages/react-dev-overlay/.gitignore

This file was deleted.

3 changes: 0 additions & 3 deletions packages/react-refresh-utils/.gitignore

This file was deleted.

0 comments on commit 7b89a69

Please sign in to comment.