Compare commits

...

3 Commits

Author SHA1 Message Date
kodiakhq[bot]
2e50b9217c Merge branch 'main' into update/remix-updater-add-changeset 2023-05-17 23:39:10 +00:00
Nathan Rajlich
a3ace5d1e4 Upgrade -> Update 2023-05-17 11:57:41 -07:00
Nathan Rajlich
08d43e34a7 Add changeset for @remix-run/dev updater GH Action
Adds a changeset file when the GH Action to update `@remix-run/dev`
creates a pull request.
2023-05-17 11:56:08 -07:00

View File

@@ -7,7 +7,8 @@ module.exports = async ({ github, context }, newVersion) => {
execSync('git config --global user.name vercel-release-bot');
execSync('git checkout main');
const packagePath = path.join(__dirname, '..', 'packages', 'remix');
const repoRootPath = path.join(__dirname, '..');
const packagePath = path.join(repoRootPath, 'packages', 'remix');
const oldVersion = JSON.parse(
fs.readFileSync(path.join(packagePath, 'package.json'), 'utf-8')
).dependencies['@remix-run/dev'];
@@ -42,6 +43,17 @@ module.exports = async ({ github, context }, newVersion) => {
{ cwd: packagePath }
);
const changesetName = path.join(repoRootPath, `.changeset/${branch}.md`);
fs.writeFileSync(
changesetName,
`---
'@vercel/remix-builder': patch
---
Update \`@remix-run/dev\` fork to v${newVersion}
`
);
execSync(`git checkout -b ${branch}`);
execSync('git add -A');
execSync(`git commit -m ${branch}`);
@@ -54,8 +66,8 @@ module.exports = async ({ github, context }, newVersion) => {
repo,
head: branch,
base: 'main',
title: `[remix] Upgrade @remix-run/dev to version ${newVersion}`,
body: `This auto-generated PR updates @remix-run/dev to version ${newVersion}`,
title: `[remix] Update \`@remix-run/dev\` to v${newVersion}`,
body: `This auto-generated PR updates \`@remix-run/dev\` to version ${newVersion}.`,
});
await github.rest.issues.addLabels({