mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 21:07:46 +00:00
[tests] Fix next update cron job (#10214)
This was supposed to be fixed in https://github.com/vercel/vercel/pull/10173 but the file was created after git commit. This PR makes sure the file is created before git commit.
This commit is contained in:
2
.changeset/light-glasses-join.md
Normal file
2
.changeset/light-glasses-join.md
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
---
|
||||||
|
---
|
||||||
5
utils/update-next.js
vendored
5
utils/update-next.js
vendored
@@ -38,6 +38,8 @@ module.exports = async ({ github, context } = {}) => {
|
|||||||
.next;
|
.next;
|
||||||
if (github && oldVersion !== newVersion) {
|
if (github && oldVersion !== newVersion) {
|
||||||
updatedCount++;
|
updatedCount++;
|
||||||
|
const changeset = join(__dirname, '..', '.changeset', `${branch}.md`);
|
||||||
|
writeFileSync(changeset, `---\n---\n\n`, 'utf-8');
|
||||||
exec('rm', ['-rf', './examples/nextjs']);
|
exec('rm', ['-rf', './examples/nextjs']);
|
||||||
exec('npx', ['--yes', 'create-next-app@latest', './examples/nextjs']);
|
exec('npx', ['--yes', 'create-next-app@latest', './examples/nextjs']);
|
||||||
exec('git', [
|
exec('git', [
|
||||||
@@ -96,9 +98,6 @@ module.exports = async ({ github, context } = {}) => {
|
|||||||
} to Next.js version ${newVersion}`
|
} to Next.js version ${newVersion}`
|
||||||
);
|
);
|
||||||
|
|
||||||
const changeset = join(__dirname, '..', '.changeset', `${branch}.md`);
|
|
||||||
writeFileSync(changeset, `---\n---\n\n`, 'utf-8');
|
|
||||||
|
|
||||||
if (!github || !context) {
|
if (!github || !context) {
|
||||||
console.error('Error: missing github or context');
|
console.error('Error: missing github or context');
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user